CSS层叠样式表 常见属性
1.HTML <!DOCTYPE> 声明标签
2.颜色属性
color:rgb(255,255,255) color:rgba(255,255,255,0.1) RGBA Red(红色) Green(绿色) Blue(蓝色)和 透明度 取值0~1 0透明 1不透明.color2{ color:rgb(80,0,255) } .color5{ color:rgba(80,0,255,0.5) }
3.字体属性
1)font-family字体 2)font-weight 字体加粗 3)font-variant设置或检索对象中的文本是否为小型的大写字母font
font
font
font
font
font-family
font-family
font-family
font-family
font-family
font-family
font-style
font-style
4.背景属性
1)背景图片 background-image background-image:url(图片路径) 2)背景重复 background-repeat 重复平铺满repeat 向X轴重复repeat-x 向Y轴重复repeat-y 不重复no-repeat 3)背景位置 background-position 横向(left,center,right) 纵向(top,center,bottom) 4)简写方式 background:背景颜色 url(图像) 重复 位置(x,y) background:#f60 url(images/bg,jpg) no-repeat top center5.文本属性
1)line-height 文本行高 2)text-indent 首行缩进 3)letter-spacing 字符间距 4)word-spacing 单词 5)text-transform 文本大小写控制诗词
白日依山尽
黄河入海流欲穷千里目更上一层楼good words
6.边框属性
1)边框风格样式 none 无边框 solid 直线边框 dashed 虚线边框 dotted 点状边框 double 双线边框 groove 凸槽边框 ridge 垄状边框 inset inset边框 outset outset边框 2)单独风格 border-top-width 上边边框宽度 border-bottom-width 下边边框宽度 border-left-width 左边边框宽度 border-right-width 右边边框宽度 3)简写方式 border:solid 2px #f60 4)border值的顺序 一个值:border-color:(上、下、左、右); 两个值:border-color:(上下) (左右); 三个值:border-color:(上) (左、右) (下); 四个值:border-color:(上)(右)(下)(左);7.列表属性
1.标记的类型 list-style-type 2.标记的位置 list-style-position 3.设置图像列表标记 list-style-image 4.简写方式 list-style list-style:square inside url('/i/arrow.jpg');- option1
- option2
- option3
- option1
- option2
- option3
- option4
- option5