twitter-bootstrap 如何在 Twitter Bootstrap 中更改“活动”类的文本颜色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18651351/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 18:16:28  来源:igfitidea点击:

How to change the color of the text of 'active' class in Twitter Bootstrap

twitter-bootstrapnavbar

提问by sush

I am trying to change the color of the text in activeclass in the bootstrap framework.

我正在尝试更改active引导程序框架中类中文本的颜色。

.active{
 color:#720B87;
}

but it is taking the default one.

但它采用默认值。

回答by Zim

Assuming you're talking about a navbar .activelink, and are using the latest Bootstrap 3, it would be..

假设您正在谈论导航栏.active链接,并且正在使用最新的 Bootstrap 3,它将是..

.navbar-nav>.active>a, .navbar-nav>.active>a:hover, .navbar-nav>.active>a:focus {
  color:#720B87;
}

For 2.x (if you're not using .navbar-inverse)..

对于 2.x(如果您不使用.navbar-inverse)..

.navbar .nav>li>a {
  color:#720B87;
}