2016-08-05 61 views
0

我正在使用col-xs-offset-1在xs屏幕上以塊樣式佈局居中每列。但是,在大屏幕上,我使用col-lg-offset-3在屏幕上顯示行並居中顯示。通過這樣做,似乎col-xs-offset-1正在重寫col-lg佈局,所以現在大屏幕上的列不再居中(請參閱圖片鏈接)。這是什麼造成的?我怎麼能擁有這兩種方式? badges not centeredBootstrap col-offset

<div class="container-fluid"> 
     <div class="row"> 
      <div class="list-group"> 
       <div class="col-xs-offset-1 col-xs-10 col-sm-offset-3 col-sm-2 col-md-offset-3 col-md-2 col-lg-offset-3 col-lg-2"> 
        <a href="http://hyperurl.co/cplq6c" class="list-group-item" target="_blank"> 
         <i class="fa fa-apple fa-2x" aria-hidden="true" style="color: whitesmoke;"></i>itunes 
        </a> 
       </div> 

       <div class="col-xs-offset-1 col-xs-10 col-sm-2 col-md-2 col-lg-2"> 
        <a href="http://hyperurl.co/1qcfl6" class="list-group-item" target="_blank"> 
         <i class="fa fa-amazon fa-2x" aria-hidden="true" style="color: #ff9900;"></i>amazon 
        </a> 
       </div> 

       <div class="col-xs-offset-1 col-xs-10 col-sm-2 col-md-2 col-lg-2"> 
        <a href="http://hyperurl.co/mb95g4" class="list-group-item" target="_blank"> 
         <i class="fa fa-google fa-2x" aria-hidden="true" style="color: #34a853;"></i>google play 
        </a> 
       </div> 
      </div> 
     </div> 
    </div> 

回答

0

甲自舉偏置施加從小到大,所以COL-XS-偏移-1會影響大於XS更大的列。您可以添加col-sm-offset-0以防止偏移影響較大的列。