Bootstrap:Navbar菜单

时间:2014-01-26 06:32:04

标签: html css twitter-bootstrap

在我的页面中,我有一个导航栏菜单,这是代码:

<div class="container">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a style="margin-right: 20px;" class="navbar-brand fa fa-home fa-2x" href="#"></a>
    </div>
    <form class="navbar-form navbar-left" role="search" style="margin-left: 20px; vertical-align: middle">
        <div class="form-group">
            <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default">GO!</button>
    </form>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav"  style="margin-right: 473px;">
            <li style="margin-left: 6px;"><a class="fa fa-star fa-lg" href="#" style="margin-top: 4px;"></a></li>
            <li style="margin-left: 6px;"><a class="fa fa-users fa-lg" href="#" style="margin-top: 4px;"></a></li>
            <li style="margin-left: 6px;"><a style="font-size: 17px;  margin-top: 5px;" href="#"><span style="font-size: 12px; background-color: #cc2200;" class="badge hidden">30</span><span class="glyphicon glyphicon-bell"></span></a></li>
            <li style="margin-right: 6px; margin-top: -4px;"><a href="#"><img src="images/pic.png"/></a></li>
        </ul>           
    </div>
</nav>
</div>

但我有一个问题,当我恢复页面导航栏菜单显示如下:

enter image description here

当我点击按钮(箭头1)时,导航栏菜单采用滚动条(箭头2),但不应该采取此操作,我该如何解决?

0 个答案:

没有答案