css| Syntax
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 and can be defined either as a percentage of the length or relative to the width of its parent text, or to be processed automatically.
value :
Length-Sets the relative or absolute distance between the corresponding edge of the element and the edge of the box, valid units are: mm, cm, in, PX, PT, Pica,ex, em ...
Percent-sets the boundary size as a percentage of the width of the parent element.
Auto-automatically, this setting takes the default bounds of the browser.
Example
2, margin
function : The shorthand property that is used to set all the bounds of an element. This is used to describe the distance from 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.
value :
Length-op.
Percent-sets the boundary size as a percentage of the width of the parent element.
Auto-automatically, this setting takes the default bounds of the browser.
Example
Four, Box position properties
1, Height
function : Set the height of the element, the browser adjusts the graph to this height.
value :
Length-mm, CM, px, PT, ...
Auto-Automatic.
2, Width
function : Sets the width of the element, and the browser adjusts the graphic to that width.
value :
Length-mm, CM, in, px, PT, ...
Percent-Sets the graphic size to a percentage of the width of the parent element.
Auto-Auto Adjust
3, float
function : Used to place elements outside the regular element flow layout rules.
value :
None-no changes.
Left-places the contents of other elements on the right side 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 on-line graphics) next to the specified element.
value :
None-Unrestricted.
Left-places the element below the floating element
Right-places the element below the floating element
Both-the element is not allowed to place floating elements on either side