第四章 CSS样式表

 

第三节 “容器”的属性

 

1.边距属性

属性

属性含义

属性值

margin-top

顶端边距

<长度>、<百分比>、auto

margin-right

右侧边距

<长度>、<百分比>、auto

margin-bottom

底端边距

<长度>、<百分比>、auto

margin-left

左侧边距

<长度>、<百分比>、auto

 

 

 

 

2.填充距属性

属性

属性含义

属性值

padding-top

顶填充距

<长度>、<百分比>

padding-right

右填充距

<长度>、<百分比>

padding-bottom

底填充距

<长度>、<百分比>

padding-left

左填充距

<长度>、<百分比>

 

 

 

 

3.边框属性

属性

属性含义

属性值

border-top-width

顶边框宽度

thin、medium、thick、<长度>

border-right-width

右边框宽度

thin、medium、thick、<长度>

border-bottom-width

低边框宽度

thin、medium、thick、<长度>

border-left-width

左边框宽度

thin、medium、thick、<长度>

border-width

边框宽度

thin、medium、thick、<长度>

border-color

边框颜色

<颜色>

border-style

边框样式

none、dotted、dash、solid、double、groove、ridge、inset、outset

border-top

顶边框属性

<宽度,样式,颜色>

border-right

右边框属性

<宽度,样式,颜色>

border-bottom

底边框属性

<宽度,样式,颜色>

border-left

左边框属性

<宽度,样式,颜色>

 

 

 

 

4.图文混排属性

属性

属性含义

属性值

width

定义宽度

<长度>、<百分比>、auto

height

定义高度

<长度>、auto

float

文字环绕

left、right、none

clear

环绕边

left、right、none、both