盒子模型的元素包括content,padding,border以及margin
而W3C标准盒子模型与IE盒子模型的区别主要在height和width所涵盖的元素上。
W3C标准盒子模型的height和width指得是content的height和width
box height = content heightbox width = content width
而IE盒子模型的height与width包含了content, padding以及border
box height = content height + padding-top + border-top + padding-bottom + border-bottom
box width = content width + padding-left + border-left + padding-right + border-right
如果加入<!DOCTYPE>的话,浏览器则会根据W3C的box model来布局。