Div display and hide, div display and hide

Source: Internet
Author: User

Div display and hide, div display and hide

Visibility hidden objects also reserve the physical space occupied by the objects displayed, while display does not. You 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 with the visibility property: hidden
</Div> <br>
<Div style = "border: 1px solid #000; background: #666">
<Span style = "width: 200; height: 200; display: none"> </span>
Objects whose feature is display: none
</Div>

Note
The visibility attribute is used to control the position of the hidden object while the display is not.

Note

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 and does not reserve the space when the element is displayed.
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 elements as table title groups, which are equivalent to tHead elements.
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 ).

The road is long and the distance is long.

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.