3D diagram of CSS2 box model

xiaoxiao2021-03-06  103

Author: Acha 2004-6-25 10:16:14

The box model in CSS2 is the key to our typesetting positioning. For example,

follows the box model specification. Box model definition margin, background-color, background-image, padding, content, border, beginners often don't know the level, relationships, and interactions between them. Here is a 3D schematic of a box model, you want to make your understanding and memory.

Original map: HicksDesign

It should be noted that the IE and Mozilla browser are inconsistent with the interpretation of the box model, causing the difficulties in our positioning, mainly different:

When IE calculates the distance between 2 DIVs, the 1PX Border is calculated, while Mozilla is not; after setting the width of the DIV, if you add a value to Padding, IE will subtract this value within the width, and M Ozilla will add this value based on the width.

转载请注明原文地址:https://www.9cbs.com/read-123696.html

New Post(0)