CSS的部分常用属性整理

2016-06-28 23:08:01  css属性
CSS背景:
background:#00ffee; //设置背景颜色
background-image:url(*.jpg); //设置背景图片
background-repeat:repeat-x; //设置背景图片重复
background-attachment:fixed; //设置背景不随文字滚动

CSS文本:
text-indent: 5em; //设置文本缩进
text-transform:uppercase/lowercase/capitalize; //设置文本转换大小写
text-decoration:none/underline/overline/line-through/blink; //设置文本装饰
white-space:normal/pre; //处理空白符
color:#eeffee; //设置文本颜色
line-height:30px; //设置行高

CSS字体:
font-family: Georgia; //指定字体系列
font-style: normal/italic/oblique //指定文本正常/斜体/倾斜显示
font-weight: normal/bold/900; //指定文本的粗细
font-size: 16px/em; //指定文本的大小
font-variant: small-caps; //指定小型大写字母

CSS列表:
list-style-type:/decimal --有序列表
/decimal-leading-zero
/lower-roman
/upper-roman
/lower-alpha
/upper-alpha

/disc --无序列表
/circle
/squre
/decimal

CSS表格:
border-collapse: collapse; //设定表格塌陷
border: 1px solid black; //设定表格边缘
width: 100%; //设定表格宽度
height: 50px; //设定表格高度
text-align:right; //设定表格中文本的对齐方式
vertical-align:bottom //设定表格垂直对齐方式
padding:15px; //设定表格内边距
color:white; //设定表格中字体颜色
background-color:green; //设定表格背景颜色

CSS边框:
outline: #00ff00 dotted thick; //设定轮廓颜色/样式/宽度
border: blue solid thin; //设定轮廓

CSS的部分常用属性整理》阅读地址:http://www.haoshilao.net/1102/

最新图文教程: