Pseudo element selector (in style)
1: Use this style for the inactive state
a:link {color:red;}
2: Use this style for the activated state
a:visited{color:cyan;}
3: Use this style for the mouse hovering state
a:hover{color:cyan;}
4: Use this style when the mouse is pressed
a:active{color:cyan;}
Font attributes (in style)
字体: 样式,加粗,大小,族科,颜色(顺序不能变);
{
font:intalic,bold ,40px ,'楷体',color:red}
分开写:
a{
font-size:40px;
font-weight:bold;
font-family:'仿宋',‘楷体’,‘宋体’;
font-style:italic(倾斜);
color:red;
}
Text attributes (in style)
Small caps font:
font-variant
example: font-variant:small-caps; the
first line is indented by 2 characters:
1em=1 the size of the child
1ex=1 the size of the 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:阴影的颜色;