The CSS margin property defines the space around the element.
Margin
Margin clears the area around the element (outer border). Margin has no background color and is completely transparent
Margin can be changed individually on the top, bottom, left, and right margin of the element. You can also change all properties at once.
Margin can use negative values, overlapping content.
In CSS, it can specify different margins for different sides:
Instance
margin-top:100px;margin-bottom:100px;margin-right:50px;margin-left:50px;
Margin-Shorthand Property
The abbreviation attribute for all margin properties is "margin":
Instance
margin:100px 50px;
The margin property can have a value of one to four. /p>
margin:25px 50px 75px 100px;
Top margin is 25px
Right margin is 50px
Bottom margin is 75px
Left margin is 100px
margin:25px 50px 75px;
Top margin is 25px
Left and right margin is 50px
Bottom margin is 75px
margin:25px 50px;
Up and down margin is 25px
Left and right margin is 50px
margin:25px;
All 4 margins are 25px
"Recommended"
1. Special recommendation : "PHP Programmer Toolkit" V0.1 version download
2. Free CSS Online video tutorial
3. php.cn Lonely Nine-base (2)-css video tutorial