我的链接颜色有问题。那就是我给了这些 css 属性:
#profiletabs ul li a:link,a:visited {
display: block;
font-weight: bold;
color: #FFFFFF;
text-align: center;
padding: 7px 5px;
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
}
#profiletabs ul li a:hover,a:active {
background: -webkit-linear-gradient( #5dcb03,#65de03);
background-color: #5dcb03;
}
#tablist li .activelink {
color: #5dcb03;
background: #f5f5f5;
border-top: 1px solid #028ec6;
}
#tablist li .activelink:hover
{
background:#f5f5f5;
}
这应该是这样的:
但它看起来像这样:
我正在使用 jQuery 更改链接的颜色。它在我的笔记本电脑上运行完美,但在实时运行时出现了这个问题。
请告诉我解决方案。
最佳答案
当使用 .
css 选项时,您必须使用与第一个 so 相同的选择器字符串
#profiletabs ul li a:link, #profiletabs ul li a:linka:visited {
display: block;
font-weight: bold;
color: #FFFFFF;
text-align: center;
padding: 7px 5px;
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
}
#profiletabs ul li a:hover, #profiletabs ul li a:active {
background: -webkit-linear-gradient( #5dcb03,#65de03);
background-color: #5dcb03;
}
等等
关于css - 链接颜色没有改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22891812/