Sizing 网页中的任何物体都可以看为 box Boxes everywhere width 为 content 宽度 // box-sizing默认值 * { box-sizing: content-box; } width 为 content + padding + border, margin 为 元素外内容 * { box-sizing: border-box; } css 中 百分比(eg. width: 50%;),都指根据最近的父元素属性值进行计算。 行内元素不能设置 width and height, 但可以设置 padding and margin