Flex Layout (Flat layout)
Container properties
flex-direction
Control flow direction
flex-wrap
Controls whether to wrap
justify-content
Controls the alignment of spindle elements
align-items
Controls the alignment of sub-axis elements
align-content
Control multiple lines of content
CSS Positioning (Vertical Layout)
The hierarchy of a DIV
- The bottom layer is the background
- The next layer is the border
- The next level is the block-level child element
- One level above is the floating child element
- The top layer is the inline child element (understood as literal content)
position
attribute
relative
For relative positioning, the actual space occupied by an element remains the same (as determined by other elements), but it can be moved on displayabsolute
For absolute positioning, its position is relative to that of the nearest parent element that is not static, usually on the parent element of the element to which absolute positioning is intendedrelative
fixed
Position relative to viewPort
As soon as the element is a positioning element, it goes to the top layer
Z-index controls the number of layers in which the element is located