2017-04-03 80 views
1

这是我有,不知道为什么它并不显示。我尝试过使用float left,并尝试使用bootstrap网格,但没有成功。谢谢。我有一个IMG和IFRAME,并希望他们并排显示

<div class="container"> 
    <img src="placeholder" alt="picture of the band " width="500" height="300"> 
</div> 
<div class="container"> 
    <iframe width="560" height="315" src="https://www.youtube.com/embed/placeholder" frameborder="0" allowfullscreen></iframe> 
</div> 

回答

0

我只是用这个。有用。

.container{ 
     float: left; 
    } 

如果您使用的引导取代container与任何其他类名,做float:left它的工作原理。

<style> 
     .classname{ 
      float: left; 
     } 
</style> 

<div class="classname"> 
    <img src="placeholder" alt="picture of the band " width="500" height="300"> 
</div> 
<div class="classname"> 
    <iframe width="560" height="315" src="https://www.youtube.com/embed/placeholder" frameborder="0" allowfullscreen></iframe> 
</div> 
相关问题