On the Visibility:hidden of CSS | Collapse and Display:none

Source: Internet
Author: User
for the Visibility property in CSS, the value is usually set to visible or hidden.


visibility: Hidden equivalent to Display:none, can hide the elements, but the difference between the two:

The ①display:none element no longer occupies space.

② Visibility:hidden makes elements invisible on a Web page, but still occupies space.


However, visibility may also take a value of collapse. When the element visibility:collapse is set, the general element behaves as if it were Visibility:hidden, that is, it takes up space. However, if the element is a table-related element, such as table row, table column, table column Group, table column group, and so on, it behaves like display:none, which means that the space it occupies is freed.


There are different ways to handle visibility:collapse under different browsers:

The above features of ①visibility:collapse only work under Firefox.

② in IE even if the visibility:collapse is set, the element will still be displayed.

③ under Chrome, even if the element is hidden, regardless of whether it is a table-related element, Visibility:collapse is no different from Visibility:hidden, which still takes up space.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.