blog icon indicating copy to clipboard operation
blog copied to clipboard

CSS 盒模型

Open xuya227939 opened this issue 6 years ago • 0 comments

盒模型

盒模型分IE盒模型(怪异盒模型)和W3C盒模型,属性分别是margin、border、padding、content,两者的区别在于,IE盒模型:width=content + padding + border,而w3c盒模型:width=content,这个和现实当中的盒子比较类似,所以称之为盒模型。w3c在CSS3中新增了一个属性,box-sizing。包含两个属性:content-boxborder-boxcontent-box:width=widthborder-box:width=content+padding+border

xuya227939 avatar Jul 23 '18 07:07 xuya227939