Home>Article>Web Front-end> How to hide and occupy space in css
In CSS, the element placeholder can be hidden through the "visibility:hidden;" attribute. The visibility attribute specifies whether the element is visible. This attribute specifies whether to display the element box generated by an element; this means that the element is still visible. Occupies its original space, but can be completely invisible.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.
display:none;
Hide without placeholder
visibility:hidden;
Hide placeholder
Visibility attribute introduction
The visibility attribute specifies whether the element is visible.
Tip: Even invisible elements take up space on the page. Use the "display" attribute to create invisible elements that do not take up page space.
This attribute specifies whether to display the element box generated by an element. This means that the element still occupies its original space, but can be completely invisible. The value collapse is used in tables to remove columns or rows from the table layout.
[Recommended learning:css video tutorial]
The above is the detailed content of How to hide and occupy space in css. For more information, please follow other related articles on the PHP Chinese website!