我有一张桌子,tr里面有td,里面有一个链接。嗯,我想做一个类,它可以改变td中的链接的颜色。这是我的代码:
<style>
.dihover{transition: .5s;}
.dihover:hover{background-color:#B7192A; color: white; cursor: pointer;}
a.setan{color:#7E7E7E;}
.setan:hover{color:white;}
tr.dihover a:hover{color:white;}
</style>
<table>
<tr class="dihover">
<td><a class="setan">this supposed to change colors</a></td>
<td><a class="setan">this supposed to change colors</a></td>
</tr>
</table>我做错什么了?提前谢谢你!
发布于 2015-06-11 10:03:24
如果您需要的话,我会修改您的code..check。
<table>
<tr class= setan>
<td><a>this supposed to change colors</a></td>
<td><a>this supposed to change colors</a></td>
</tr>CSS
<style>
.dihover{transition: .5s;}
.dihover:hover{background-color:#B7192A; color: white; cursor: pointer;}
a.setan{color:#7E7E7E;}
.setan:hover{color:white;}
tr.dihover a:hover{color:white;}
</style> https://stackoverflow.com/questions/30777329
复制相似问题