案例:CSS案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style>
5
a:link {color:#FF0000;}    /* 未被访问的链接 */
6
a:visited {color:#00FF00;} /* 已被访问的链接 */
7
a:hover {color:#FF00FF;}   /* 鼠标指针移动到链接上 */
8
a:active {color:#0000FF;}  /* 正在被点击的链接 */
9
</style>
10
</head>
11
12
<body>
13
<p><b><a href="/index.html" target="_blank">这是一个链接</a></b></p>
14
<p><b>注释:</b>为了使定义生效,a:hover 必须位于 a:link 和 a:visited 之后!!</p>
15
<p><b>注释:</b>为了使定义生效,a:active 必须位于 a:hover 之后!!</p>
16
</body>
17
</html>
18