css - Firefox 中的链接颜色

标签 css firefox colors hyperlink

我正在更改网页中链接的颜色。 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/

相关文章:

javascript - CSS:每次为数字时钟刷新时,如何使跨度的大小不变

javascript - 如何触发CSS动画

javascript - 在 Firefox 控制台中记录指向源代码的链接

html - Firefox 中奇怪的表格呈现

css div 在 Chrome (18) 和 Firefox (11) 中对齐,但在 Safari (5.1) 中不对齐。想不通为什么

css - 覆盖 CSS 嵌套属性

firefox - 未知属性 '-moz-box-shadow'。声明被丢弃

javascript - 如何获得纯色背景色和半透明叠加色的有效结果(6位十六进制值)?

iOS-如何显示金色

python - Pyplot 极坐标散点图颜色的标志