好的,所以我尝试将打开的 twitter bootstrap 下拉菜单的背景颜色更改为深灰色,但它仍然是白色!帮助将非常感激......
这是CSS代码:
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
padding: 4px 0;
margin: 0;
list-style: none;
background-color:#606060;
border-color: #ccc;
border-color: rgba(0, 0, 0, 0.2);
border-style: solid;
border-width: 1px;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
}
HTML 代码:
<div class="span2">
<div id="networkSelection">
<label class="play-label"><div class="localized-label">NETWORK</div></label>
<ul class="nav nav-pills">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Select Network <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="#">Los Angeles Unified</a></li>
<li><a href="#">Harry Potter Club</a></li>
<li><a href="#">X-Games Enthusiasts</a></li>
<li><a href="#">Pasadena Kids Club</a></li>
<li><a href="#">RECOMMENDED NETWORKS</a>
</ul>
<ul>
<li><a href="#">Los Angeles Unified</a></li>
<li><a href="#">Harry Potter Club</a></li>
<li><a href="#">X-Games Enthusiasts</a></li>
<li><a href="#">Pasadena Kids Club</a></li>
</ul>
</li>
</ul>
</div>
</div>