盒模型:从外到内有:margin、border、padding、content。
W3C盒模型:
也是所谓的标准盒模型,它的 width 和 height 是对 content 设置的,

Paste_Image.png
IE盒模型:
它的 width 和 height 是对 border 的外边缘设置的。

Paste_Image.png
优缺点:
- W3C标准盒模型对 content 内容的宽高设置更加方便。但是当需要设置整个盒子的 border 宽高时候需要计算。
- IE盒模型对整个盒子的 border 宽高设置更加方便。但是对 content 内容设置就需要计算。