导航栏颜色Twitter的引导导轨
问题描述:
这里是在GitHub上一个Link to Source Code导航栏颜色Twitter的引导导轨
- 我为了学习一些轨道和这样
- 不过,我有麻烦不断变化的颜色简单的任务分叉项目设NavBar
- 看来我要改变
bootstrap_and_overrides.css.less
没有任何效果
我尝试了好几种方法。 。 。
...
.....
....... app/assets/stylesheets/bootstrap_and_overrides.css.less
...........
.............
// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
//
// Example:
// @linkColor: #036747;
.navbar {
background-color: #A4C8EC;
background-image: none;
}
方法2
...
.....
.......
...........
.navbar-inverse .navbar-inner {
background-color: #FFFFFFF;
border-color: #252525;
}
方法3
...
.....
.......
...........
@navbarBackground: #ffffff;
思想
- 我确定我正在使用bootstrap或更少的变量以错误的方式。
- 如果您需要更多的源代码,它在GitHub - 链接顶部 页面。
感谢
答
至于Mallanaga到您的信息的评论中提到的,你可以尝试添加!important
的CSS,所以:
.navbar-inverse .navbar-inner {
background-color: #FFFFFFF;
border-color: #252525;
}
变为:
.navbar-inverse .navbar-inner {
background-color: #FFFFFFF !important;
border-color: #252525 !important;
}
另外,请仔细检查您是否正在使用.navbar-inverse
i你的HTML而不是.navbar-default
。
+0
添加'!important'没有效果,但是我对html的引用不正确 – 2014-10-08 05:00:53
答
确保您的引导文件包含在您的application.css中,以便资产管道完整并且可以进行编辑!
application.css
/*
*
* require bootstrap
*
*/
你尝试加入'!important'? – Dudo 2014-10-07 20:51:24
你有没有试过把头撞在键盘上?这通常会让我头痛。 – 2014-10-07 21:39:41
@Mallanaga我试着加入'!important'但没有改变。 – 2014-10-08 04:47:29