前端笔记之元素盒子模型

margin:当设置百分比时,参照父元素宽度。

padding

width

height

border

position

content

transform

box-sizing:border-box|content-box;

display

重绘和渲染

有时display:inline-block多出5px,在其父节点添加:font-size:0

猜你喜欢

转载自blog.csdn.net/qq_45393395/article/details/120564680