在css网页布局中,不可避免的会涉及到css伪类的问题。到底该如何正确的定义css伪类呢?虽然VeVb中有很多相关的介绍,但复习一下也无妨。大家看下面的代码就能明白。
a.VeVbcom{text-decoration:none;}
a.VeVbcom:link{color:#f90;}
a.VeVbcom:hover{color:#fff;background-color:#ff5900;}
a.VeVbcom:active{color:#ff5900;}
<a href="http://www.VeVb.com/" class="VeVbcom">第一种写法 - 网页设计</a>
a .nav2 {color: #777;text-decoration: none;}
a:link .nav2 {color: #777;}
a:hover .nav2 {color: #f60;}
a:active .nav2 {color: #f60;}
<a href="http://www.VeVb.com/">
<span class="nav2">第二种写法 - 网页设计</span>
</a>
.wwwVeVb a {text-decoration: none;color: #ccc; }
.wwwVeVb a:visited {color: #ccc;}
.wwwVeVb a:hover {color: #f60;}
<span class="wwwVeVb">
<a href="http://www.VeVb.com/">第三种写法 - 网页设计</a>
</span>
新闻热点
疑难解答