2014-02-28 82 views
0

我使用Twitter的引导3更改背景颜色3

我想改变堆叠导航丸的背景颜色(UL)

CSS

.red .active a, 
.red .active a:hover { 
    background-color: red !important; 
} 

HTML

<div class="col-lg-3"> 
       <ul class="nav nav-pills nav-stacked red" id="NavParent"> 
        <li class=""><a href="#" onclick="MenuToggle(this)"><span class="pull-right glyphicon glyphicon-arrow-down"> 
        </span>Home</a> 
         <div class="collapse"> 
          <ul class="nav nav-pills nav-stacked"> 
           <li class=""><a href="#">Home1</a></li> 
           <li><a href="#">Profile</a></li> 
           <li><a href="#">Messages</a></li> 
          </ul> 
         </div> 
        </li> 
       </ul> 
      </div> 

我在这里错过了什么?

回答

2

看来你错过了要添加的类别.red

.red, .red .active a, 
.red .active a:hover { 
    background-color: red !important; 
}