CSS伪类选择器
a标签
/*未激活的状态*/
a:link{
color:red;
}
/*激活后的状态*/
a:visited{
color:red;
}
/*鼠标悬浮*/
a:hover{
color:red;
}
/*鼠标按住*/
a:active{
color:red;
}
字体属性
字体大小 font-size
字体加粗 font-weight:bold/normal
字体族科 font-family:'楷体'
字体样式 font-style:italic
字体颜色 color
字体:样式 加粗 大小 族科 font:italic bold 40px 楷体
小型大写字母 font-variant:small-caps
文本属性
1em = 1个字的大小
1ex = 1个x的大小
2ex= 1em
首行缩进2个字符 text-index:2em
行高 lin-height
字符间距 letter-spacing
文本阴影 text-shadow:10px 10px 10px rgb(25,25,225)
参数1:阴影水平位置
参数2:阴影垂直位置
参数3:阴影模糊度
参数4:阴影颜色
颜色属性
设置外边距 margin
向左浮动 float:left
hsl h — 色相/色调
s — 饱和度
l — 亮度/明度
a — 透明度
下划线
text-decoration:none
没有文本修饰
text-decoration:under red
红色下划线
text-decoration:underline wavy red
红色波浪线
text-decoration:overline
文本上
text-decoration:blink
闪烁
列表
空心圆 list-style:circle
清除列表样式 list-style:none
’
背景
image
设置背景图片
color
设置背景颜色
repeat
设置背景是否平铺
no-repeat
不平铺
repeat-x
沿x轴平铺
repeat-y
沿y轴平铺
size
设置背景大小
100% 100%
百分百显示
cover
平铺
position
定位
百分比/方向
水平 left center right
垂直 top center bottom
百分比:
1个参数 四个方向
2个参数 水平 垂直
固定背景
background-attachment:fixed;
固定背景