This article will be very short.
Then as shown in the picture above, margin refers to the outer margin, padding refers to the inner margin, the border has its own pixel width, and the element is multiplied by 1335 Take 392 places.
There are four margins, like padding, top right bottom left. You can choose margin-top to set them one by one, or you can use margin:10px 0 0 0;.
Then take margin as an example, padding is similar, and there are three forms of parameters that can be followed.
1.margin: 3px 5px;??Two parameters represent top, bottom and left and right respectively, that is, the top and bottom margins are both 3px, and the left and right margins are both 5px.
2.margin: 10px 15px 5px;??Three parameters, representing top, left, and bottom respectively, that is, the top margin is 10px, the left and right margins are both 15px, and the bottom margin is 5px.
3.margin: 10px 7px 5px 8px;??Four parameters, representing top, right, bottom and left respectively, that is, top margin 10px, right margin 7px, bottom margin 5px, left margin 8px.
Padding has the same writing method and meaning.
above.