![Bootstrap navbar] [1]
图片:网址:http://snag.gy/M6vEI.jpg
您好,我正在学习Bootstrap。我正在尝试使用Bootstrap navbar类创建自定义菜单。我在这里使用3列。 1表示徽标,2表示导航栏,3表示社交图标。我正在使用导航栏部分的默认导航栏类。我能够改变导航栏的背景颜色。但我无法更改导航栏的边框。有人能帮我吗 ?怎么改呢?
<nav class="navbar navbar-default navbar-background">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header navbar-background">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<!--<span>Menu</span>-->
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-background" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active navbar-background ">
<a href="#" class="navbar-background">Link <span class="sr-only">(current)</span></a>
</li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse --><!-- /.container-fluid -->
答案 0 :(得分:0)
用css:
.navbar-default { border-color: pink !important; }
!important
语句可能没有必要,具体取决于您放置css规则的位置。