2017-08-21 20 views
1

我正在使用引導程序編寫一個自適應網站,但是當我嘗試調整窗口大小時,導航欄的摺疊按鈕沒有顯示出來。相反,它會在其旁邊進行滾動。滾動顯示在自舉導航欄中的摺疊按鈕附近

截圖:

enter image description here

<section class="first" > 
 
     <div class="layer"></div><span class="icon-bar"></span> 
 
     <nav class="navbar navbar-default navbar-fixed-top conta"> 
 
    <div class="container"> 
 
    <!-- Brand and toggle get grouped for better mobile display --> 
 
    <div class="navbar-header"> 
 
     <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> 
 
     <span class="sr-only">Toggle navigation</span> 
 
     <span class="icon-bar"></span> 
 
     <span class="icon-bar"></span> 
 
     <span class="icon-bar"></span> 
 
     </button> 
 
     <a class="navbar-brand list" href="#">Brand</a> 
 
    </div> 
 

 
    <!-- Collect the nav links, forms, and other content for toggling --> 
 
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> 
 
    
 
     
 
    <ul class="nav navbar-nav navbar-right"> 
 
         <li role="presentation"><a href="#" class="list">First Item</a></li> 
 
         <li role="presentation"><a href="#" class="list">Second Item</a></li> 
 
         <li role="presentation"><a href="#" class="list">Third Item</a></li> 
 
        </ul> 
 
    </div><!-- /.navbar-collapse --> 
 
    </div><!-- /.container-fluid --> 
 
</nav>

+0

首先提供完整的代碼的CSS。你在「第一」課和其他課程中申請什麼課程?我已經檢查你的HTML沒有任何問題。所以更好地提供與上述HTML相關的CSS,然後輕鬆解決您的問題。 –

回答

1

的代碼片段沒有複製你的問題,但在你的CSS,你可以嘗試:

.navbar-header { 
    overflow:hidden !important; 
}