CSS(2)

层次选择器:
E F后代
E>F子类
E+F相邻
E~F通用兄弟
伪类选择器:
F :frist-child
F :last-child
E F:nth-child(n)
属性选择器:
E[attr]
E[attr=val]
E[attr*=val]
E[attr^=val]attr属性的值以val开头的
E[attr$=val]
行高line-height
背景颜色为透明transparent
font-weight文本加粗:
normal默认值400
bold粗体
bolder更粗700
lighter细体
font-family字体类型:
隶书,楷体
font-size字体大小:
px,em,rem
font-style字体风格:
noraml普通
italic斜体,电脑带的斜体
oblique斜体
font:style weight size family 字体
风格→粗细→大小→类型
color颜色
text-align水平对齐:
center居中
vertical-align垂直对齐:
middle
text-indent文本缩进
line-height文本行高
text-decoration文本装饰:
underline下划线
none没有
overline上划线
line-throungh删除线
text-shadow文本阴影:
color x-offset y-offset blur-radiu
颜色 x轴 y轴 半径
超链接伪类样式:
a:hover鼠标移上去超链接样式
a:visited单机访问后超链接样式
a:link未单机访问时超链接样式
a:active鼠标单击为释放的超链接样式
link>visited>hover>active
列表
list-style-type:
none无标记符
disc实心圆默认
circle空心圆
square实心正方形
decimal数字
background-color背景颜色
background-image背景图像
bcakground-repeat:
repeat背景重复
no-repeat不重复
repeat-x X轴重复
repeat-y Y轴重复
background-position:
Xpx Ypx
Xxx%Yxx%
X Y
background-size背景尺寸:
auto默认值
percentage百分比值
cover填充整个元素
contain保持本身宽高的比例放大
linear-gradient(position,color1,color2…)
渐变方向 颜色1 颜色2

猜你喜欢

转载自blog.csdn.net/qq_42844262/article/details/81907577