First, block-level elements and inline elements
1, block-level elements: (1) block-level elements inside the content default in the upper left corner;
(2) block-level elements in a single row by default;
2, inline elements: (1) will not be affected by height and width
(2) Inline elements do not occupy a single line.
Second, box model
1, padding:1px up and down the internal margin
1px 2px up/down, left and right margin
1px 2px 3px Top, left, bottom padding
1px 2px 3px 4px top, bottom, left, right padding
Padding applies to block-level elements and inline elements
2, Margin:margin to block-level elements all applicable, inline elements around the applicable, up and down not applicable
3, border: Border type border thickness border color.
Third, relative positioning and absolute positioning
Difference: 1, set absolute positioning to out of the document flow, and set relative positioning is not detached
2, absolute positioning is relative to the entire form, relative positioning is relative to the parent tag
CSS Lesson Two