a.white:hover与.white A:hover的区别

作者:我就是个世界 发表于:2008-11-19
.white A:active {
    TEXT-DECORATION: none
}
.white A:hover {
    TEXT-DECORATION: none
是不规范的伪类;
a.white:link {
    color: #FFFFFF;
}
a.white:hover {
    color: #00CCFF;
}
是规范的伪类。参考:


[html]

www.husw.net


www.husw.net

[/html]
[separator]
[code]<style type="text/css">
<!--
A.style1:link    {
    text-decoration: none;
    color:#666666;
    font-weight: normal;
}
A.style1:visited {
    text-decoration: none;
    color: #666666;
    font-weight: normal;
}
A.style1:active {
    text-decoration: none;
    color: #333333;
    font-weight: normal;
}
A.style1:hover {
    text-decoration: underline overline;
    color: #333333;
    font-weight: normal;
}
A.style2:link    {
    text-decoration: none;
    color:#000099;
    font-weight: normal;
}
A.style2:visited {
    text-decoration: none;
    color: #000099;
    font-weight: normal;
}
A.style2:active {
    text-decoration: none;
    color: red;
    font-weight: normal;
}
A.style2:hover {
    text-decoration: none;
    color: red;
    font-weight: normal;
    font-size: 120%;
}
-->
</style>
<p><a href="http://www.husw.net" class="style1">www.husw.net</a></p>
<p><a href="http://www.husw.net" class="style2">www.husw.net</a></p>[/code]

分享:

扫一扫在手机阅读、分享本文

请发表您的评论