无法在bootstrap 3中更改navbar的颜色? [英] unable to change color of navbar in bootstrap 3?

查看:509
本文介绍了无法在bootstrap 3中更改navbar的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照此帖子来自定义navbar。同时我遇到了链接,它使用简单的navbar类。所以我从那里借来了。

  .navbar.navbar-www {
background-color:#3E8956;
border-color:#3E8956;
}

nav 在上面的链接中声明如下:

 < nav class =navbar navbar-fixed-top navbar-inverse navbar- role =navigation> 

我在bootstrap.css和我的custom.css之后加载了custom.css, navbar-www。
即使在那之后,我的导航栏仍然是黑色(navbar-inverse)。
,但在开发者工具中,我可以看到它被重写到我的custom.css背景颜色navbar-www。



我不知道为什么这是发生和如何解决这个问题?



编辑:
修复类.navbar .navbar-www的拼写错误


pre> .navbar.navbar-xxx {
background-color:#000000;
border-color:#c0392b;
}


I followed this post for customizing navbar. meanwhile I came across link which uses a simple navbar class. So I borrowed this from there

.navbar.navbar-www {
    background-color: #3E8956;
    border-color: #3E8956;
}

and the nav declared as follows in the above link:

<nav class="navbar navbar-fixed-top navbar-inverse navbar-www" role="navigation">

I had my custom.css loaded after bootstrap.css and my custom.css had the above css for navbar-www. even after that, my navbar is still in black color (navbar-inverse). but in the developer tools, I could see it is over-written to my custom.css background color for navbar-www.

I cannot figure out why this is happening and how to fix this?

EDIT: fixed a typo for the class .navbar .navbar-www

解决方案

Here is what I did, and it should work fine In your CSS file:

 .navbar.navbar-xxx{
   background-color: #000000;
   border-color: #c0392b;
 }

这篇关于无法在bootstrap 3中更改navbar的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
前端开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆