Difference between display and visibility: displayvisibility

Source: Internet
Author: User

Difference between display and visibility: displayvisibility
Visibility hidden objects also reserve the physical space occupied by the objects displayed, while display does not. Vilibility: hidden (hidden), visible (display)> display: none (hidden), block (display) style = "display: none" can save the following code to see the effect: procedure: Sample Code: <div style = "border: 1px solid #000; background: # eee"> <span style = "width: 200; height: 200; visibility: hidden "> </span> objects whose attribute is visibility: hidden </div> <br> <div style =" border: 1px solid #000; background: #666 "> <span style =" width: 200; height: 200; display: none "> </span> when the SS attribute is display: none object </div> special prompt v The isibility property controls the hidden object and occupies the position when it is displayed, while the display does not. In particular, the display attribute sets the display mode of the element. The corresponding script features display. Optional values include none, block, and inline. The values are described as follows: none hides the element, the space when the element is displayed is not retained. Block display element. Displays elements in inline. The inline-block object is displayed as an embedded element, but all sub-objects are displayed as block elements. Adjacent embedded elements are displayed in the same line, with spaces allowed. List-item displays block elements as list objects and can add project punctuation points. (IE6.0 + supported) table-header-group displays the element as the table title group, which is equivalent to tHead element. Table-footer-group displays an element as a table footer group, which is equivalent to a tFoot element. The visibility attribute sets whether to display elements. The corresponding script features are visibility. The optional values are inherit, hidden, and visible. The values are described as follows: inherit inherits the visibility attribute settings of the parent element. Hidden elements are hidden, but the occupied space is retained. Visible display element (default ).

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.