伪元素选择器 字体属性 文本属性

伪元素选择器(style里)

1:未激活的状态用此样式
a:link {color:red;}
2:激活后的状态用此样式
a:visited{color:cyan;}
3:鼠标悬浮的状态用此样式
a:hover{color:cyan;}
4:鼠标按住时用此样式
a:active{color:cyan;}

字体属性(style里)

字体: 样式,加粗,大小,族科,颜色(顺序不能变);
	{
    
    font:intalic,bold ,40px ,'楷体',color:red}
分开写:
a{
    
    
	font-size:40px;
	font-weight:bold;
	font-family:'仿宋',‘楷体’,‘宋体’;
	font-style:italic(倾斜);
	color:red;
}

文本属性(style里)

小型大写字体:
font-variant
例:font-variant:small-caps;
首行缩进2字符:
1em=1个子的大小
1ex=1个x的大小
2ex=1em;

首行缩进     text-indent:2em;
行高    line-height:1.5;
字间距 letter-spacing:5px;
文本溢出是否使用省略标记: text-overflow
字体下划线: text-decoration;
下划线:underline;
上划线:overline;
贯穿线:line-through;
文本阴影 text-shadow:10px 10px 10px  yellow
参数1:阴影的水平位置;
参数2:阴影的垂直位置;,
参数3:阴影的模糊度;
参数4:阴影的颜色;

猜你喜欢

转载自blog.csdn.net/starry__sty/article/details/108572385