2017-03-29 93 views
0

在第一個col之前,剩下很大的空間,就像我用過pull-1一樣。在第一行之前,我的導航欄有margin-bottom:0;在引導第一步之前刪除額外的空間

這裏是我的代碼

<div class="container-fluid"> 

      <div class="row" gpon-pic-area> 
             <div class="col-md-2" style="background-color: red"> 
              Inspection 
                  <br> 
                  <div class="rail-select gpon-pic-area"> 
                 <div class="select-side"> 
                  <i class="fa fa-angle-down"></i> 
                 </div> 
                 <select class="form-control gpon-pic-area" > 
                          <option value="portStatus">Port Status</option> 
                    <option value="portAlarm">Port Alarm</option> 
                    <option value="portUsage">Port Usage</option> 
                    <option value="portBandwidth">Port Bandwidth</option> 
                         </select> 
                    </div> 
             </div> 
</div> 
</div> 
+0

這是所有的代碼是什麼? – ZimSystem

+0

不,但我剛剛找到解決方案。我將導航欄的高度增加了10px,現在利用margin-bottom更好。可能這是一個解決它的方法 – Erad

回答

1

我認爲你是在談論由容器流體創造的空間。

使用容器流體

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
 
<div class="container-fluid"> 
 

 
    <div class="row" gpon-pic-area> 
 
    <div class="col-md-2" style="background-color: red"> 
 
     Inspection 
 
     <br> 
 
     <div class="rail-select gpon-pic-area"> 
 
     <div class="select-side"> 
 
      <i class="fa fa-angle-down"></i> 
 
     </div> 
 
     <select class="form-control gpon-pic-area"> 
 
                          <option value="portStatus">Port Status</option> 
 
                    <option value="portAlarm">Port Alarm</option> 
 
                    <option value="portUsage">Port Usage</option> 
 
                    <option value="portBandwidth">Port Bandwidth</option> 
 
                         </select> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

沒有容器流體

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
 

 

 
    <div class="row" gpon-pic-area> 
 
    <div class="col-md-2" style="background-color: red"> 
 
     Inspection 
 
     <br> 
 
     <div class="rail-select gpon-pic-area"> 
 
     <div class="select-side"> 
 
      <i class="fa fa-angle-down"></i> 
 
     </div> 
 
     <select class="form-control gpon-pic-area"> 
 
                          <option value="portStatus">Port Status</option> 
 
                    <option value="portAlarm">Port Alarm</option> 
 
                    <option value="portUsage">Port Usage</option> 
 
                    <option value="portBandwidth">Port Bandwidth</option> 
 
                         </select> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

希望這有助於!

相關問題