1. padding and margin, several parameters, 1. paddingmargin
This article will be very short.
As shown in, margin refers to the margin, padding refers to the padding, and border has its own pixel width, where the element is multiplied by 1335 by 392.
Margin and padding have four in total, top right bottom left -- top right bottom left. You can choose one by one settings such as margin-top, or margin: 10px 0 0 0.
Taking margin as an example, padding is similar. There are three forms of parameters that can be followed.
1. margin: 3px 5px; -- two parameters, respectively, indicate the upper and lower sides, that is, the upper and lower margins are 3px, and the left and right margins are both 5px.
2. margin: 10px 15px 5px; -- three parameters, indicating the top, left, and bottom, that is, the top margin is 10px, the left and right margins are 15px, and the bottom margin is 5px.
3. margin: 10px 7px 5px 8px; -- four parameters: Top, right, bottom, and left, that is, the top margin is 10px, the right margin is 7px, the bottom margin is 5px, and the left margin is 8px.
Padding is the same writing method and meaning.
Above.