2016-11-07 10 views
0

イメージと埋め込みビデオの間にはギャップがあります。モバイルビューでは問題ありません。水平イメージと埋め込みビデオのギャップ

<div class="section"> 
 
    <div class="container-fluid"> 
 
    <div class="row"> 
 
     <div class="col-sm-6"><div class="embed-responsive embed-responsive-16by9"> 
 

 
     <img class="embed-responsive-item" width="600px" height="360" src="images\phone.jpg"/>         </div> 
 
     </div> 
 
     <div class="col-sm-6"> 
 
     <div class="embed-responsive embed-responsive-16by9"><iframe width="560" height="315" class="embed-responsive-item" src="https://www.youtube.com/embed/_k4SA"></iframe> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</div>

+0

を入力してください[**、最小完全、かつ検証例を**](http://stackoverflow.com/help/mcve)。 – Ricky

+0

[インラインブロック要素間のスペースを削除するにはどうすればいいですか?](http://stackoverflow.com/questions/5078239/how-to-remove-the-space-between-inline-block-elements) – Aswin

答えて

1

COL-SM-6で 'nopadding' クラスを追加...それはあなたの問題を解決します。

<div class="section"> 
    <div class="container-fluid"> 
    <div class="row"> 
     <div class="col-sm-6 nopadding"><div class="embed-responsive embed-responsive-16by9"> 

     <img class="embed-responsive-item" width="600px" height="360" src="images\lenovok5.jpg"/>         </div> 
     </div> 
     <div class="col-sm-6 nopadding"> 
     <div class="embed-responsive embed-responsive-16by9"><iframe width="560" height="315" class="embed-responsive-item" src="https://www.youtube.com/embed/_9G7CGbk4SA"></iframe> 
     </div> 
     </div> 
    </div> 
    </div> 
</div> 

CSSファイル次のコードを追加します。

.nopadding { 
    padding: 0 !important; 
    margin: 0 !important; 
} 
関連する問題