Distance between outer distance and outer distance of CSS margin, that is, the distance between div and div
CSS outer margin. Distance interval, for example, 2 upper and lower DIV boxes, we can use the margin style to achieve the upper and lower 2 Box spacing. Margin appears on the outside of the object border, closely to the border, marign is opposite to the padding position, but CSS padding is clinging to the border inside the border.
1, margin basic syntax and structure - TOP
DIV CSS refers to the CSS attribute word margin, margin is the extension of the outer edge of the four sides of the object, no background color and no color. The value of
1 and margin syntax
Margin:10px
Margin is a digital HTML unit. Leave. The value of
margin has three cases, which can be a positive integer and a negative integer and add units such as PX pixels (margin-left:20px); can be a auto automatic property (margin-left:auto automatic); can be a percentage (%) value (margin-left:3%).
Margin extension (separately setting quadrangle spacing attribute words)
margin-left object left epitaxial margin (margin-left:5px; left epitaxy distance 5px)
margin-right object right extension margin (margin-right:5px; right extension distance 5px)
upstream epitaxial margin PX; upper extension distance 5px)
margin-bottom object lower edge epitaxy margin (margin-bottom:5px; lower edge denotation distance 5px)
common margin usage scene