Re: CSS margin external distance from outer space, namely div to div spacing.
two layout distance settings. The
css instance tutorial example margin view
the gap between the yellow color background of the "CSS manual" and "DIV CSS research classroom" (background red).
two, CSS margin abbreviated shorthand - TOP
margin attribute CSS style, such as up and down, left and right, up and down, and so on, we can abbreviate optimization.
you may need to understand: CSS optimizes -CSS compression: http://www.divcss5.com/jiqiao/j97.shtml
you may need to know: HTML optimized -HTML code optimization compression: http://www.divcss5.com/jiqiao/j326.shtml
1, only the upper and lower case abbreviations
primitive: margin-bottom:6px
abbreviations Margin:5px 0 6px 0 or margin:5px auto 6px auto
2, only left and right abbreviations of
primitive: margin-left:5px; margin-right:6px
abbreviated as: margin:0 0 or three cases. 6px; margin-left:4px
abbreviation: margin:5px 0 6px 4PX or margin:5px auto 6px 4px
4. In-bottom:6px; margin-left:7px; margin-right:8px
abbreviation: margin:5px 8px 6px 7px;
6, the upper and lower values of the four sides and the same abbreviations are the same. />
Margin shorthand analysis diagram:
css div margin style abbreviated syntax application analysis diagram