Three, Box boundary properties
1, Margin-bottom
Margin-left
Margin-right
Margin-top
Features: These four properties are used to set the distance between an element and its adjacent elements, which can be defined either as a percentage of length or relative to the width of its parent text, or automatically.
Numerical:
Length-Sets the relative or absolute distance between the corresponding edge of the element and the edge of the box, in units of: mm, CM, in, PX, PT, Pica,ex, em ...
Percent-sets the bounding dimension as a percentage of the parent element's width.
Auto-automatically, this setting takes the default bounds of the browser.
Example
2. Margin
Features: Shorthand property, which is used to set all boundaries of an element. This is the distance that is used to describe the edge of the element's content to the edge of the box. This area is always transparent and you can see the background of the page below.
Numerical:
Length-Ibid.
Percent-sets the bounding dimension as a percentage of the parent element's width.
Auto-automatically, this setting takes the default bounds of the browser.
Example
Four, Box position properties
1. Height
Function: Sets the height of the element, and the browser adjusts the graphic to that height.
Numerical:
Length-mm, CM, px, PT, .....
Auto-Automatic.
2. Width
Function: Sets the width of the element, and the browser adjusts the shape by this width.
Numerical:
Length-mm, CM, in, px, PT, ...
Percent-Sets the drawing size to a percentage of the parent element's width.
Auto-Automatic adjustment
3, float
Function: Used to place elements outside the normal element flow arrangement rules.
Numerical:
None-no change.
Left-places the contents of other elements to the right of the floating element.
Right-places the contents of other elements on the left side of the floating element.
4. Clear
Function: Allows or disables the placement of other elements (usually linear) next to the specified element.
Numerical:
None-Unlimited.
Left-place the element below the floating element
Right-place the element underneath the floating element
Both-element is not allowed to place floating elements on either side
The above is the CSS Grammar Manual (four) text fill, border, border and position attributes (ii), more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!