这是我的html代码
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="30"><a class="doll" href="<?php echo base_url();?>home/cr/USD"></a></td>
<td width="30"><a class="eu" href="<?php echo base_url();?>home/cr/EUR"></a></td>
<td width="30"><a class="pou" href="<?php echo base_url();?>home/cr/GBP"></a></td>
</tr>
</table>
并列出了我的 CSS
a.doll:link{background:url(../images_en/dollar.png) no-repeat; width:27px; height:27px; float:left;}
a.doll:hover,a.doll:active {background:url(../images_en/dollar_active.png) no-repeat; width:27px; height:27px; float:left;}
a.eu:link {background:url(../images_en/euro.png) no-repeat; width:28px; height:28px; float:left;}
a.eu:hover,a.eu:active {background:url(../images_en/euro_active.png) no-repeat; width:28px; height:28px; float:left;}
a.pou:link {background:url(../images_en/pound.png) no-repeat; width:28px; height:28px; float:left;}
a.pou:hover,a.pound:active {background:url(../images_en/pound_active.png) no-repeat; width:28px; height:28px; float:left;}
在这里我可以看到 :hover 正在工作,但如果 ;active 则不行