1.深入理解盒子模型_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:33:08
Original
1016 people have browsed it

盒子模型

1.盒子模型的组成:margin border padding content;

2.border: 

  在属性值的设置中,如果给出2个属性值,前者表示上下边框的属性,后者表示左右边框的属性;如果给出3个属性值,前者表示上边框,中间表示左右边框,后者表示下边框;如果给出4个属性值,按照上,右,下,左的顺序。设置背景的时候,浏览器覆盖的区域是content,padding,border。

2.margin:

  1)需要记录的是水平的margin是相加,垂直方向的margin会造成塌陷,采用较大的margin。

  2)嵌套盒子的margin:子块会以父块的content为参考。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!