CSS 属性表简表(1)
CSS技巧">CSS 属性表简表,列出了一些我们常用的CSS的属性。
属性名称 属性含义 属性值字体属性(Font)font-family 使用什么字体 所有的字体font-style 字体是否斜体 Normal、italic、obliquefont-variant 是否用小体大写 Normal、small-capsfont-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-repeatBackground-attachment 设置滚动 Scroll、FixedBackground-position 初始位置 Percentage、length、top、left、right、bottom等文本属性Word-spacing 单词之间的间距 Normal <length>Letter-spacing 字母之间的间距 Normal <length>Text-decoration 文字的装饰样式 Noneunderlineoverlineline-throughblinkVertical-align 垂直方向的位置 Baselinesubsupertoptext-topmiddlebottomtext-bottomText-transform 文本转换 CapitalizeuppercaselowercasenoneText-align 对齐方式 LeftrightcenterjustifyText-indent 首行的缩进方式 <length><percentage>Line-height 文本的行高 Normal<number><length><percentage>边距属性Margin-top 顶端边距 LengthpercentageautoMargin-right 右侧边距 LengthpercentageautoMargin-bottom 底端边距 LengthpercentageautoMargin-left 左侧边距 Lengthpercentageauto填充距属性Padding-top 顶端填充距 LengthpercentagePadding-right 右侧填充距 LengthpercentagePadding-bottom 底端填充距 LengthpercentagePadding-left 左侧填充距 Lengthpercentage边框属性Border-top-width 顶端边框宽度 ThinmediumthicklengthBorder-right-width 右侧边框宽度 ThinmediumthicklengthBorder-bottom-width 底端边框宽度 ThinmediumthicklengthBorder-left-width 左侧边框宽度 ThinmediumthicklengthBorder-width 一次定义宽度 ThinmediumthicklengthBorder-color 设置边框颜色 Color