SlideShare a Scribd company logo
1 of 8
W3C-css-盒子模型

    学习笔记

  Dale 2012/3/23
CSS 框模型概述
内边距 padding


属性                    描述
                      简写属性。作用是在一个声明中设置元
padding
                      素的所内边距属性。
padding-bottom        设置元素的下内边距。
padding-left          设置元素的左内边距。
padding-right         设置元素的右内边距。
padding-top           设置元素的上内边距。
边框 border

属性                  描述
                    简写属性,用于把针对四个边的属性设
border
                    置在一个声明。
                    用于设置元素所有边框的样式,或者单
border-style
                    独地为各边设置边框样式。
                    简写属性,用于为元素的所有边框设置
border-width
                    宽度,或者单独地为各边边框设置宽度。
                    简写属性,设置元素的所有边框中可见
border-color
                    部分的颜色,或为 4 个边分别设置颜色。
                    简写属性,用于把下边框的所有属性设
border-bottom
                    置到一个声明中。
内边框 margin


属性                   描述
                     简写属性。在一个声明中设置所有外边
margin
                     距属性。
margin-bottom        设置元素的下外边距。
margin-left          设置元素的左外边距。
margin-right         设置元素的右外边距。
margin-top           设置元素的上外边距。
外边距合并
• 当两个垂直外边距相遇时,它们将形成一个外边距
• The end.

More Related Content

Viewers also liked

The fathers-love-letter
The fathers-love-letterThe fathers-love-letter
The fathers-love-letterkeke302
 
Js闭包
Js闭包Js闭包
Js闭包keke302
 
Artistieke fotoreportages
Artistieke fotoreportagesArtistieke fotoreportages
Artistieke fotoreportagespovesti
 
Js 函数 function学习笔记
Js 函数 function学习笔记Js 函数 function学习笔记
Js 函数 function学习笔记keke302
 
Js reg正则表达式
Js reg正则表达式Js reg正则表达式
Js reg正则表达式keke302
 

Viewers also liked (7)

The fathers-love-letter
The fathers-love-letterThe fathers-love-letter
The fathers-love-letter
 
Js闭包
Js闭包Js闭包
Js闭包
 
Artistieke fotoreportages
Artistieke fotoreportagesArtistieke fotoreportages
Artistieke fotoreportages
 
Js 函数 function学习笔记
Js 函数 function学习笔记Js 函数 function学习笔记
Js 函数 function学习笔记
 
Ventilasi Mekanik
Ventilasi MekanikVentilasi Mekanik
Ventilasi Mekanik
 
proyecto educativo
proyecto educativoproyecto educativo
proyecto educativo
 
Js reg正则表达式
Js reg正则表达式Js reg正则表达式
Js reg正则表达式
 

W3 c css-盒子模型

  • 1. W3C-css-盒子模型 学习笔记 Dale 2012/3/23
  • 3. 内边距 padding 属性 描述 简写属性。作用是在一个声明中设置元 padding 素的所内边距属性。 padding-bottom 设置元素的下内边距。 padding-left 设置元素的左内边距。 padding-right 设置元素的右内边距。 padding-top 设置元素的上内边距。
  • 4. 边框 border 属性 描述 简写属性,用于把针对四个边的属性设 border 置在一个声明。 用于设置元素所有边框的样式,或者单 border-style 独地为各边设置边框样式。 简写属性,用于为元素的所有边框设置 border-width 宽度,或者单独地为各边边框设置宽度。 简写属性,设置元素的所有边框中可见 border-color 部分的颜色,或为 4 个边分别设置颜色。 简写属性,用于把下边框的所有属性设 border-bottom 置到一个声明中。
  • 5. 内边框 margin 属性 描述 简写属性。在一个声明中设置所有外边 margin 距属性。 margin-bottom 设置元素的下外边距。 margin-left 设置元素的左外边距。 margin-right 设置元素的右外边距。 margin-top 设置元素的上外边距。
  • 7.