[英]Navbar color Twitter Bootstrap Rails
這是GitHub上的源代碼鏈接
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;
思考
謝謝
正如Mallanaga在對您的帖子的評論中提到的那樣,您可以嘗試在CSS中添加!important
,因此:
.navbar-inverse .navbar-inner {
background-color: #FFFFFFF;
border-color: #252525;
}
變為:
.navbar-inverse .navbar-inner {
background-color: #FFFFFFF !important;
border-color: #252525 !important;
}
另外, .navbar-inverse
檢查您是否在HTML中實際使用了.navbar-inverse
而不是.navbar-default
。
確保您的bootstrap文件包含在application.css中,以便資產管道完成並且可以進行編輯!
application.css
/*
*
* require bootstrap
*
*/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.