Box model

2017-08-24  本文已影响0人  一船西瓜
  1. 盒子模型概念:

盒子模型(Box Model)是CSS控制页面时一个很重要的概念。

image.png

content edge or inner edge
The content edge surrounds the rectangle given by the width and height of the box, which often depend on the element's rendered content. The four content edges define the box's content box
.
padding edge
The padding edge surrounds the box padding. If the padding has 0 width, the padding edge is the same as the content edge. The four padding edges define the box's padding box
.
border edge
The border edge surrounds the box's border. If the border has 0 width, the border edge is the same as the padding edge. The four border edges define the box's border box
.
margin edge or outer edge
The margin edge surrounds the box margin. If the margin has 0 width, the margin edge is the same as the border edge. The four margin edges define the box's margin box
.

  1. 盒子模型属性:
  1. 盒子之间关系:
上一篇 下一篇

猜你喜欢

热点阅读