Drupal 7 Bootstrap .active css 无法覆盖?
Drupal 7 Bootstrap .active css can't override?
我无法覆盖 .active 的 bootstrap css。
我已经设法超越了许多其他人,但不是这个。有人有想法吗?
我想做的是改变颜色和背景色。
这是我的CSS:
.active {
color: #AAAA33;
background-color: #303030;
}
要覆盖此类元素,您应该将它们声明为 !important
:
.active {
color: #AAAA33 !important;
background-color: #303030 !important;
}
即使这里 !important
的使用相当相关,考虑到 框架 ,你应该小心这一点,不要养成坏习惯随处使用它,就像 Chris Coyier When Using !important is The Right Choice 文章中所建议的那样。
如何在您的代码中包含“!important”?喜欢
color: #AAAA33 !important;
background-color: #303030 !important;
如果还是不行,请记下您自己的 css 文件中的所有行
.navbar-default .navbar-nav > .active > a {
color: #AAAA33;
background-color: #303030;
}
我无法覆盖 .active 的 bootstrap css。 我已经设法超越了许多其他人,但不是这个。有人有想法吗?
我想做的是改变颜色和背景色。
这是我的CSS:
.active {
color: #AAAA33;
background-color: #303030;
}
要覆盖此类元素,您应该将它们声明为 !important
:
.active {
color: #AAAA33 !important;
background-color: #303030 !important;
}
即使这里 !important
的使用相当相关,考虑到 框架 ,你应该小心这一点,不要养成坏习惯随处使用它,就像 Chris Coyier When Using !important is The Right Choice 文章中所建议的那样。
如何在您的代码中包含“!important”?喜欢
color: #AAAA33 !important;
background-color: #303030 !important;
如果还是不行,请记下您自己的 css 文件中的所有行
.navbar-default .navbar-nav > .active > a {
color: #AAAA33;
background-color: #303030;
}