What are the common layout methods in css

王林
Release: 2020-07-30 17:39:38
forward
2966 people have browsed it

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!

Related labels:
css
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!