我一直在尝试在引导模板的导航栏中更改文本颜色,并且不成功.任何人知道我在哪里错了?这是我的代码
<!--navbar--> <div class="navbar navbar-fixed-top"> <div class="navbar-inner" id="nav-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="#">Restaurant</a> <div class="nav-collapse"> <ul class="nav"> <li class="active"><a href="#"><i class="icon-home icon-white"></i> Home</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"> </b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> </ul> </li> </ul> <form class="navbar-search pull-right" action=""> <input type="text" class="search-query span2" placeholder="Search"> </form> </div><!-- /.nav-collapse --> </div><!-- /.container --> </div><!-- /.navbar-inner --> </div><!-- /.navbar --> <!--navbar-->
CSS:
.navbar-inner { color: #FFF; }
我也试过这个:
#nav-inner { color: #FFF; }
解决方法
如果要更改选项卡的CSS,您需要添加颜色:#ddd;到以下
.navbar .nav > li > a { float: none; line-height: 19px; padding: 9px 10px 11px; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0.25); color: #ddd; }
希望它有帮助!