A Brief Introduction to the margin parameter and a brief introduction to margin
A Brief Introduction to the margin parameters:
This attribute is used to set the outer margin of an element. It is no longer described here. The only problem that may cause this attribute is its parameter, because it can have up to four parameters, there are also abbreviations. For example, you can only include one parameter. The following is a brief introduction.
The parameter list is as follows:
1. When there is a parameter, it will act on the four sides, for example, margin: 10px.
2. When there are two parameters, the first is used for top and bottom, and the second is used for left and right, for example, margin: 10px auto.
3. When there are three parameters, the first is used for the top, the second is used for the left and right, and the third is used for the bottom, for example, margin: 10px 5px 20px.
4. When there are four parameters, the order of top, right, bottom, and left will be applied to the four sides, for example, margin: 5px 10px 20px 5px.
For more information, see the section "margin attributes" in CSS.
Original address: http://www.51texiao.cn/div_cssjiaocheng/2015/0525/2444.html
The most original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9622.