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"