盒模型
width : <length> | <percentage>|auto|inherit
還有max-width 和 min-width屬性。
height: <length> | <percentage>|auto|inherit
還有max-height和min-height屬性
基本上只會對塊級元素設(shè)置寬度和高度,對行級元素沒有用。
padding:[<length>|<percentage>]{1,4} | inherit
四個方向的默認順序
不同方向?qū)傩灾档目s寫
對面相等,后者省略轴总,四面相等三热,只設(shè)置一個
margin:[<length>|<percentage> | auto ]{1,4} | inherit
margin合并
毗鄰元素取兩者中最大的睛藻,如有重復(fù)則合并。
水平居中
border
圓角矩形
水平半徑碍侦,垂直半徑 順時針
內(nèi)容超出了盒尺寸的情況
實際上還有overflow-x和overflow-y屬性
默認情況下width和height是content box粱坤,但是也可以改為border-box
盒子陰影
box-shadow :none | <shadow>[,<shadow>]*<shadow>:inset?&&<length>{2,4}&&<color>?
outline
類似于border隶糕,但是沒有四個方向,不占空間站玄,在border之外