nav class="navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header navbar-rights"> <a class="navbar-brand" href="#home">首页</a> </div> <div> <!--向右对齐--> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a href="#life" class="dropdown-toggle" data-toggle="dropdown"> 生活 <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><a href="#volunteer">公益</a></li> <li><a href="#art">美术</a></li> <li><a href="#reading">读书</a></li> <li><a href="#music">音乐</a></li> <li><a href="#skating">花滑</a></li> </ul> </li> <li><a href="#study"><span></span>学习</a></li> <li><a href="#work"><span></span>工作</a></li> <li><a href="#more"><span></span>更多</a></li> </ul>
.icon-bar{border: 1px solid #fff;} .navbar{background: #d9534f;} .navbar .navbar-brand .navbar .navbar-brand:hover{color: #fff;} #navbar li a{color: #fff;} #navbar li.active a{background:#fff;color: #d9534f;font-weight: bold} #navbar li.dropdown .dropdown-toggle{background: #d9534f;} #navbar li.dropdown .dropdown-menu{background: #d9534f;} #navbar li.dropdown .dropdown-menu li a:hover{background: #900;}
我向上面这样写了,而且css文件放在了bootstrap引入文件之后引入,还是无法覆盖bootstrap的导航栏,不知道为什么会这样?
千秋此意
慕的地6079101
LeJo