2017-02-23 52 views
0

我這個簡單的情況在自舉方面刪除偏移wieport大小

<div class="row full" id="slogan"> 

     <div class="col-sm-4 col-sm-offset-1 text-center" id="girl"> 
      <img src="<?php the_field('immagine_slogan'); ?>" /> 
     </div> 

     <div class="col-sm-6 text-center" id="colonna-testo-slogan"> 
      <div class="testo-slogan"> 
      <h2><?php the_field('titolo_slogan'); ?></h2> 
      <?php the_field('descrizione_slogan'); ?> 
      </div> 
     </div> 


    </div> 

我想,在-COL-SM-4 COL-SM-偏移1時wieport尺寸小於X px刪除偏移量! 是否有可能?

回答

0

使用媒體查詢。例如,當X = 800 ..

@media (max-width: 800px) { 
    .reset-offset.col-sm-offset-1 { 
     margin-left: 0; 
    } 
} 

http://www.codeply.com/go/vFfstYZnAH

+0

但是這種解決方案來編輯​​每次.COL-SM-偏移-1在我的網站時,最大寬度:400像素,是吧? 我不想要這種情況,但僅限於此! –

+0

然後在列中使用自定義類名稱。 – ZimSystem

+0

或選擇'#slogan> .col-sm-offset-1 {}'但自定義類'.reset-offset'是一種更好的解決方案 – FelipeAls