简体   繁体   English

如何设置Twitter Bootstrap 3导航栏的颜色

[英]How to set color of Twitter Bootstrap 3 navbar

I'm working with Twitter Bootstrap 3.2.0 and I need to change the color of the "navbar" from basic black to another color. 我正在使用Twitter Bootstrap 3.2.0,我需要将“导航栏”的颜色从基本黑色更改为另一种颜色。 I've tried everything and I can't get it to change in CSS. 我已经尝试了所有方法,但无法在CSS中进行更改。

I have gotten it to work properly in an add-in that calls a CDN yet I need to control it myself in CSS. 我已经知道它可以在名为CDN的加载项中正常工作,但是我需要自己在CSS中对其进行控制。

I have properly loaded the bootstrap files in the proper order. 我已经按照正确的顺序正确加载了引导文件。

Does anyone have a method that will let me change this - either with a style sheet or in-line command. 是否有人可以使用样式表或嵌入式命令来更改此方法?

Thanks very much!!! 非常感谢!!!

只需转到此处: http ://getbootstrap.com/customize/并自定义导航栏,然后下载自定义的Boostrap。

As long as you use the default navbar, it's as simple as to target the .navbar-default class, like this: 只要使用默认导航栏,就可以像定位.navbar-default类一样简单,如下所示:

.navbar-default {
    background-color: #FC0;
    border-color: #E7E7E7;
}

And onbiously you can play with screen sizes, use different colors based on which page you are and so on 而且令人难以置信的是,您可以使用屏幕尺寸进行播放,根据您所在的页面使用不同的颜色等等。

I made a Bootply to show you 我做了个Bootply给你看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM