Home > Article > Web Front-end > What are the common layout methods in css
Several common layout methods:
(Recommended tutorial: css quick start)
Fixed layout
Fluid layout (adaptive layout)
Elastic layout (retractable layout)
Positioned layout
Floating layout
Responsive layout (media query)
The fixed layout means that the width and height of the box are fixed. margin, padding, etc.
The flow of fluid layout refers to the width, height and margin of the box, and padding is a percentage. So it is also called percentage layout.
(Video tutorial recommendation: css video tutorial)
There are the following points to note:
The percentage is based on the element The size of the parent is calculated;
The horizontal or vertical spacing of the element is calculated relative to the width of the parent. (margin&padding)
The border cannot be set with percentage
Positioning layout refers to absolute positioning, relative positioning and fixed positioning.
Floating positioning is only float:left; and float:right; remember to clear the float.
The above is the detailed content of What are the common layout methods in css. For more information, please follow other related articles on the PHP Chinese website!