我正在更改网页中链接的颜色。 CSS:
a:link, a:visited, a:active {
color: #009900 !important;
text-decoration: none;
}
a:hover {
background-color: #009900;
color: #ffffff !important;
text-decoration: none;
}
.lemmas a:link, a:visited, a:active {
color: #014e68 !important;
text-decoration: none;
}
.lemmas a:hover {
background-color: #014e68;
color: #ffffff !important;
text-decoration: none;
}
.feel a:link, a:visited, a:active {
color: #ff3300;
text-decoration: none;
}
.feel a:hover {
background-color: #ff3300;
color: #ffffff !important;
text-decoration: none;
}
链接只用最后一种颜色着色,即分配给 Firefox 中的类 feel
的颜色。在 Internet Explorer 中,颜色显示完美。问题出在哪里?
最佳答案
我认为这些选择器:
.lemmas a:link, a:visited, a:active {}
.feel a:link, a:visited, a:active {}
应该看起来像:
.lemmas a:link, .lemmas a:visited, .lemmas a:active {}
.feel a:link, .feel a:visited, .feel a:active {}
如果不是,:visited
和 :active
伪类将应用于所有已访问和事件的链接。
关于css - Firefox 中的链接颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18330450/