我正在使用简单的伪选择器 css 功能。当我将鼠标悬停在表格单元格上时,它们会改变背景颜色,很简单。但是当表格单元格的原始背景颜色是线性渐变时, td:hover 不再起作用。这是我的代码:
CSS:
#rightDiv td{
font-size: 18px;
color: #ffffff;
padding: 10px 5px;
/*background: rgba(0,0,0,0.7);*/
background: -moz-linear-gradient(top, rgba(55,160,252,1) 0%, rgba(8,126,216,1) 46%, rgba(28,97,175,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(55,160,252,1)), color-stop(46%,rgba(8,126,216,1)), color-stop(100%,rgba(28,97,175,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(55,160,252,1) 0%,rgba(8,126,216,1) 46%,rgba(28,97,175,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(55,160,252,1) 0%,rgba(8,126,216,1) 46%,rgba(28,97,175,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(55,160,252,1) 0%,rgba(8,126,216,1) 46%,rgba(28,97,175,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(55,160,252,1) 0%,rgba(8,126,216,1) 46%,rgba(28,97,175,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#37a0fc', endColorstr='#1c61af',GradientType=0 ); /* IE6-8 */
border: 1px solid #444444;
}
#rightDiv td:hover{
color: #444444;
background: rgba(255,255,255,0.4);
border: 1px solid #999999;
text-decoration: none;
}
#rightDiv a{
color: #fff;
}
#rightDiv a:hover{
color: #444444;
}
HTML:
<div id="rightDiv">
<table width="100%" height="100%">
<tr><td><a href="" target="_blank">Our Plans</a></td></tr>
<tr><td><a href="" target="_blank">Our tariffs vs local mobile</a></td</tr>
<tr><td><a href="" target="_blank">Our service vs other VoIP</a></td></tr>
<tr><td><a href="" target="_blank">Our tariffs vs Skype</a></td></tr>
<tr><td><a href="" target="_blank">Tariff lookup</a></td></tr>
<tr><td><a href="">Become an Agent/Franchisee</a></td></tr>
</table>
</div>
关于为什么线性渐变会破坏我的伪类的任何建议?
谢谢你