Home>Article>Web Front-end> What is the difference between display:none and visibility:hidden
The difference between [display:none] and [visibility:hidden] is: 1. The former does not reserve its physical space for hidden objects, while the latter reserves its physical space for hidden objects; 2. The former The structure will not be loaded until the value becomes block, which will already load it when the page is loaded.
##display:noneDo not reserve physical space for hidden objects
Reserves its physical space for the hidden object, that is,display:
;When its value becomes
, where it is located The structure will be loaded.And
will be loaded in when the page is loaded, because when its value ishidden
, the space it occupies is still exist.After using the CSS
attribute, the width, height and other attribute values of the HTML element (object) will be "lost";and the visibility: After the hidden attribute, the HTML element (object) is only visually invisible (completely transparent), and the space it occupies still exists
Recommended tutorial: "
css tutorialThe above is the detailed content of What is the difference between display:none and visibility:hidden. For more information, please follow other related articles on the PHP Chinese website!