<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>伪类使用</title>
<style type="text/css">
<!--
a:link {
color:red;
}
a:visited {
color: green;
}
a:hover {
color: blue;
}
a:active {
color: yellow;
}
-->
</style>
</head>
<!--
锚伪类
a:link{color:#FF0000}
a:visited{color:#00FF00} 已访问的链接
a:hover{color:#0000FF} 鼠标移动到链接上
a:active{color:#00FF00} 选定的链接
-->
<body>
<a href="test.html" target="_blank">跳转到2.html</a>
<p>注:在css定义中,a:hover必须位于a:link和a:visited之后才能生效,a:active必须位于a:hover之后,才能生效</p>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
a.one:link {
color: #FF0000;
}
a.one:visited{ color:#0066CC;}
a.one:hover{ color:#FF99CC;}
a.two:link {
color: #FF0000;
}
a.two:visited{ color:#0066CC;}
a.two:hover{ font-size:large;}
a.three:link {color: #FF0000;}
a.three:visited{ color:#0066CC;}
a.three:hover{ background-color:#33CCCC}
a.four:link {color: #FF0000;}
a.four:visited{ color:#0066CC;}
a.four:hover{ font-family:Georgia, "Times New Roman", Times, serif}
a.five:link {color: #FF0000; text-decoration:none}
a.five:visited{ color:#0066CC; text-decoration:none}
a.five:hover{
text-decoration: underline;
}
-->
</style>
</head>
<body>
<a class="one" href="1.html" target="_blank">这个链接改变颜色</a><br/>
<a class="two" href="1.html" target="_blank">这个链接改变大小</a><br/>
<a class="three" href="1.html" target="_blank">这个链接改变背景色</a><br/>
<a class="four" href="1.html" target="_blank">这个链接改变字体风格</a><br/>
<a class="five" href="1.html" target="_blank">这个链接加下划线</a>
</body>
</html>