CSS属性列表
| ||
属性名称 | 属性含义 | 属性值 |
字体属性(Font) | ||
font-family | 使用什么字体 | 所有的字体 |
font-style | 字体是否斜体 | Normal、italic、oblique |
font-variant | 是否用小体大写 | Normal、small-caps |
font-weight | 字体的粗细 | Normal、bold、bolder、lithter等 |
font-size | 字体的大小 | Absolute-size、relative-size、length、percentage等 |
颜色和背景属性 | ||
Color | 定义前景色 | 颜色 |
Background-color | 定义背景色 | 颜色 |
Background-image | 定义背景图案 | 路径 |
Background-repeat | 重复方式 | Repeat-x、repeat-y、no-repeat |
Background-attachment | 设置滚动 | Scroll、Fixed |
Background-position | 初始位置 | Percentage、length、top、left、 right、bottom等 |
文本属性 | ||
Word-spacing | 单词之间的间距 | Normal<length> |
Letter-spacing | 字母之间的间距 | 同上 |
Text-decoration | 文字的装饰样式 | None|underline|overline|line- through|blink |
Vertical-align | 垂直方向的位置 | Baseline|sub|super|top|text-top|middle|bottom|text-bottom| |
Text-transform | 文本转换 | Capitalize|uppercase| lowercase|none |
Text-align | 对齐方式 | Left|right|center|justify <length>|<percentage> |
Text-indent | 首行的缩进方式 | Normal|<number>|<length>| |
Line-height | 文本的行高 | <percentage> |
边距属性 | ||
Margin-top | 顶端边距 | Length|percentage|auto |
Margin-right | 右侧边距 | 同上 |
Margin-bottom | 底端边距 | 同上 |
Margin-left | 左侧边距 | 同上 |
填充距属性 | ||
Padding-top | 顶端填充距 | Length|percentage |
Padding-right | 右侧填充距 | 同上 |
Padding-bottom | 底端填充距 | 同上 |
Padding-left | 左侧填充距 | 同上 |
边框属性 | ||
Border-top-width | 顶端边框宽度 | Thin|medium|thick|length |
Border-right-width | 右侧边框宽度 | 同上 |
Border-bottom-width | 底端边框宽度 | 同上 |
Border-left-width | 左侧边框宽度 | 同上 |
Border-width | 一次定义宽度 | 同上 |
Border-color | 设置边框颜色 | Color |
Border-style | 设置边框样式 | None|dotted|dash|solid等 |
Border-top | 一次定义顶端 | Border-top-width|color等 |
Border-right | 一次定义右侧 | 同上 |
Border-bottom | 一次定义底端 | 同上 |
Border-left | 一次定义左侧 | 同上 |
Width | 定义宽度属性 | Length|percentage|auto |
Height | 定义高度属性 | Length|auto |
Float | 文字环绕 | Left|right|none |
Clear | 哪一边环绕 | Left|right|none|both |
分级属性 | ||
Display | 定义是否显示 | Block、inline、list-item、none |
White-space | 怎样处理空白 | Normal、pre、nowrap |
List-style-type | 加项目编号 | Disc、circle、square等 |
List-style-image | 加图案 | <url>|none |
List-style-position | 第二行起始位置 | Inside、outside |
List-style | 一次定义列表 | <keyword>|<position> |<url> |
鼠标(Cursor)属性 | ||
自动 | Auto | |
定位“十”字 | Crosshair | |
默认指针 | Default | |
手形 | Hand | |
移动 | Move | |
箭头朝右方 | e-resize | |
箭头朝右上方 | Ne-resize | |
箭头朝左上方 | Nw-resize | |
箭头朝上方 | n-resize | |
箭头朝右下方 | Se-resize | |
箭头朝左下方 | Sw-resize | |
箭头朝下方 | s-resize | |
箭头朝左方 | w-resize | |
文本“I”形 | Text | |
等待 | Wait | |
帮助 | Help |
width="468" scrolling="no" height="15" frameborder="0" allowtransparency="allowtransparency" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-1391084545775812&dt=1188321160533&lmt=1187587166&format=468x15_0ads_al&output=html&correlator=1188321159912&channel=7913117752&url=file%3A%2F%2F%2FC%3A%2FDocuments%2520and%2520Settings%2FAdministrator%2F%E6%A1%8C%E9%9D%A2%2Fblog%2FCSDN%E6%96%87%E7%AB%A0%E9%A1%B6%E9%83%A8%E5%AF%BC%E8%88%AA.htm&color_bg=FFFFFF&color_text=000000&color_link=0000FF&color_url=000000&color_border=FFFFFF&ga_vid=67140282.1188321161&ga_sid=1188321161&ga_hid=360720269&flash=9&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=16&u_tz=480&u_his=1&u_java=true" marginheight="0" marginwidth="0" name="google_ads_frame">
width="468" scrolling="no" height="60" frameborder="0" allowtransparency="allowtransparency" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-1391084545775812&dt=1187587040446&lmt=1187587036&format=468x60_as&output=html&correlator=1187587040416&channel=8802996721&url=file%3A%2F%2F%2FC%3A%2FDocuments%2520and%2520Settings%2FAdministrator%2F%E6%A1%8C%E9%9D%A2%2FCSDN%E6%96%87%E7%AB%A0%E5%BA%95%E9%83%A8.htm&color_bg=FFFFFF&color_text=000000&color_link=0000FF&color_url=000000&color_border=FFFFFF&ad_type=text&ga_vid=1630047283.1187587040&ga_sid=1187587040&ga_hid=4528641&flash=9&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=16&u_tz=480&u_java=true" marginheight="0" marginwidth="0" name="google_ads_frame">