Home >Web Front-end >CSS Tutorial >Introduce how to use CSS margins
CSS Margin(Margin)PropertiesDefines 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 change the top, bottom, left, and right margins of the element independently. It is also possible to change all properties at once.
Margin can use negative values and overlapping content.
18c470802f0a2fc537972c41232405c3
margin:25px 50px 75px 100px;
The top margin is 25px
The right margin is 50px
The bottom margin is 75px
The left margin is 100px
margin:25px 50px 75px;
The top margin is 25px
The left and right margins are 50px
The bottom margin is 75px
margin:25px 50px;
The top and bottom margins are 25px
The left and right margins are 50px
margin:25px ;
All 4 margins are 25px
[Related recommendations]
1. Special recommendation:"php Programmer Toolbox" V0.1 version download
2. Free css online video tutorial
3. php.cn Dugu Jiujian (2)-css video tutorial
The above is the detailed content of Introduce how to use CSS margins. For more information, please follow other related articles on the PHP Chinese website!