Home > Web Front-end > CSS Tutorial > CSS thorough research (2)

CSS thorough research (2)

黄舟
Release: 2016-12-22 16:26:27
Original
1570 people have browsed it

CSS thorough research (2)

Github pages blog post

1. CSS box model

1. The structure of the box

margin-border-padding structure + content content constitutes the box model

Note

width,height are taken It is the width and height of the content area, excluding padding border margin, but the actual height of the box must include the outer three (padding border margin)

The assignment order, clockwise, top (top)->right (right)- >Bottom->Left(left)

----top(1)----->|| |left(4) |right(2)| |<---bottom( 3)----

Assignment, one value, four values ​​are this, such as margin: 10px; Assignment, two values, two values ​​​​are assigned to top right, that is, the first two, and then, bottom = top, left = right assignment, three values, respectively assigned to top right bottom, that is, the first three, and then left = right assignment, four values, needless to say...

representation in various browsers html

Representation in browser developer tools