21.CSS box model "under"

Source: Internet
Author: User

16th Chapter CSS Box Model "under"

First, Element visibility

You can use the Visibility property to achieve the visibility of an element, which can generally be combined with JavaScript to achieve the effect.

Properties value description CSS version

{Visible default value, element on page 2

Visibility {Hidden element is not visible, but occupies space 2

{ The Collaose element is not visible, hiding the rows and columns of the table,

if it's not a table, it's the same as hidden 2

Second, the element box type ( The Display property in the CSS box model can change the element itself box type)

1. Block-level elements (chunks): elements that can set the element size and isolate the functionality of other elements. For example:<div>,<p> can document elements.

2. Inline element (inline): Cannot set element size, he can only adapt to content, cannot isolate other elements, other elements will follow immediately thereafter. For example:<span>,<b> can text elements.

3 . Inline - block Element (inline block): element dimensions can be set, but other elements cannot be isolated. For example:

Properties value description CSS version

{ block box is blocks-level element 1

Display {inline box is inline element 1

{inline-block box is inline - block-level element 2

{None box is not visible, no placeholder 1

third, the floating element ( The CSS box model has a floating box, which is The floating direction of the box through the float property.

Properties value description CSS version

{ left floating element on 1

float { Right floating element on 1

{None no float 1

There is a problem with the float just now: When an element box is floated, the following elements are automatically stacked, causing the element to be invisible or partially invisible, and we can use the clear property to handle it.

Properties value description CSS version

{None allows floating on both sides 1

Clear { left border not floating 1

{ Right margin does not float 1

{Both cannot float on either side 1

21.CSS box model "under"

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.