wut*_*aer 48 css href twitter-bootstrap
嗨,我正在使用Bootstrap.
Bootstrap定义
a:hover, a:focus {
color: #005580;
text-decoration: underline;
}
Run Code Online (Sandbox Code Playgroud)
我有这个链接/ CSS类
<a class="green" href="#">green text</a>
<a class="yellow" href="#">yellow text</a>
Run Code Online (Sandbox Code Playgroud)
如何禁用胡佛颜色?
我希望绿色链接保持绿色,黄色黄色保持黄色,不要覆盖:为每一个班级悬停?(这个问题不是必须依赖于bootstrap).
我需要类似的东西
a:hover, a:focus {
color: @nonhoovercolor;
}
Run Code Online (Sandbox Code Playgroud)
而我想
.yellow {
color: yellow !important;
}
Run Code Online (Sandbox Code Playgroud)
不是一个好习惯
wut*_*aer 146
如果有人关心我最终:
a {
color: inherit;
}
Run Code Online (Sandbox Code Playgroud)
Mah*_*oud 11
我会选择像这样的JSFiddle:
HTML:
<a class="green" href="#">green text</a>
<a class="yellow" href="#">yellow text</a>
Run Code Online (Sandbox Code Playgroud)
CSS:
body { background: #ccc }
/* Green */
a.green,
a.green:hover { color: green; }
/* Yellow */
a.yellow,
a.yellow:hover { color: yellow; }
Run Code Online (Sandbox Code Playgroud)
小智 8
a {background-color:transparent !important;}
Run Code Online (Sandbox Code Playgroud)
对我来说,上面的简单解决方案都不起作用,但是通过仅更改悬停,我能够让它工作:
:hover {
color: inherit;
text-decoration: none;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
111351 次 |
| 最近记录: |