Home>Article>Web Front-end> Does the css standard model include margins?

Does the css standard model include margins?

青灯夜游
青灯夜游 Original
2021-07-22 17:49:42 1930browse

css standard model includes margins. The standard box model consists of actual content, padding, border and margin.

Does the css standard model include margins?

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

The CSS box model is a thinking model used by CSS technology that is often used in web design. It means that in a web document, each element is presented as a rectangular box, describing the element. The content of the space occupied.

The box model is an important concept in CSS. Only by understanding the box model can we do better layout.

The Box Model can be used to layout elements, which consists of the actual content (content), padding, border and margin.

Standard box model

Does the css standard model include margins?

From the above figure we can see that the scope of the standard box model includes: content, padding, border, margin, and the content part does not contain other parts.

The width and height of the standard box model only include content, not including padding and border.

(Learning video sharing:css video tutorial)

The above is the detailed content of Does the css standard model include margins?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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