html - 更改链接的默认颜色

标签 html css

在我的代码中有

<div class="row-fluid"><div class="span12" style="color:red"><a href="/event/alert/recipient/list/${alertStatusForm.forAlert.id}" class="underline">${fn:length(alertStatusForm.totalNotSentRecipient)}</a></div></div>

还是不行 请建议

最佳答案

您必须将 CSS 直接应用于 <a> . <a>元素默认不会继承字体颜色。

CSS:

.span12 a{
   color: red
}
a:visited{
   color: red
}

关于html - 更改链接的默认颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18464711/

相关文章:

css - 与 LESS css 一起使用的最佳网格框架是什么?

html - 对于 Jquery UI 按钮,如何去除焦点上的蓝色光晕?

html - 悬停事件 CSS 根本不起作用

jquery - 在定位的 div 中从右侧悬停时滑动 Div

html - 为什么在调整窗口大小时 div 不可见

jquery - 如何切换:hover effect?

html - 我怎样才能让这个文本一直坐在左边?

css - Bootstrap 侧边栏

javascript - 在 JQuery (Javascript) 中构建内存游戏迷你游戏

css - nth-of-type 与 nth-child