Home  >  Article  >  Web Front-end  >  How to hide and occupy space in css

How to hide and occupy space in css

藏色散人
藏色散人Original
2021-04-08 09:30:233161browse

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.

How to hide and occupy space in css

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.

How to hide and occupy space in css

[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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn