我正在使用Bootstrap。
Bootstrap定义了
a:hover, a:focus {
color: #005580;
text-decoration: underline;
}
我有这些链接/ CSS 类
<a class="green" href="#">green text</a>
<a class="yellow" href="#">yellow text</a>
如何禁用鼠标悬停颜色?
我想让绿色链接保持绿色,黄色链接保持黄色,而不需要针对每个类别覆盖:hover样式?(这个问题并不一定依赖于Bootstrap)。
我需要类似以下的内容:
a:hover, a:focus {
color: @nonhoovercolor;
}
我认为
.yellow {
color: yellow !important;
}
这不是一个好的做法。
<div class="yellow"><a>链接</a></div>
。这正确吗? - arjabbarbackground-color: inherit;
,谢谢! - Ultimater