CSS Visibility and Display properties

Source: Internet
Author: User

All major browsers support the visibility property.

Note: The "Inherit" and "collapse" property values are not supported by any version of Internet Explorer (including IE8).

The Visibility property specifies whether the element is visible. Even invisible elements occupy space on the page.

The display property to create an invisible element that does not occupy the page space. Even invisible elements do not occupy space on the page.

This property specifies whether to display an element that is generated by the elements box. This means that the element still occupies its original space, but it can be completely invisible. The value collapse is used in the table to remove columns or rows from the table layout.

Default value: Visible
Inheritance: Yes
Version: CSS2
JavaScript Syntax: object. style.visibility= "Hidden"
VisibilityThe desirable value
value Description
Visible The default value. The element is visible.
Hidden The element is not visible.
Collapse When used in a TABLE element, this value can delete one row or column, but it does not affect the layout of the table. The space occupied by rows or columns is left for other content to use. If this value is used on other elements, it is rendered as "hidden".
Inherit Specifies that the value of the visibility property should be inherited from the parent element.

CSS Visibility and Display properties

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.