2016-09-16 72 views
0

我在Bootsrap中有新圖片,並且遇到了將圖片放在另一個div旁邊的問題,它始終顯示在其下方。我嘗試調整圖像和其他一些東西的大小,但沒有奏效。 下面是代碼:將圖像放在引導區的div旁邊

 <div class="container"> 
     <div class="row"> 
       <div class="col-lg-4 col-md-4 col-sm-6 hidden-lg"><h1>Services</h1> 
       </div> 
       <div class="col-lg-4 col-md-4 col-sm-6 hidden-lg"> 
        <img src="img/logo.jpg" class="img-responsive" alt="logo" /> 
       </div> 
      </div> 
    </div> 

回答

2

首先,儘量把你的行內容放入一個div類=「容器」

然後,如果你想顯示在文本旁邊你的形象,你可以添加類col-xs-4(或其他數字)到您的列。

你的最終代碼會是這樣的:

<div class="container"> 
<div class="row"> 
       <div class="col-lg-4 col-md-4 col-sm-6 col-xs-4 hidden-lg"><h1>Services</h1> 
       </div> 
       <div class="col-lg-4 col-md-4 col-sm-6 col-xs-4 hidden-lg"> 
        <img src="img/logo.jpg" class="img-responsive" alt="logo" /> 
       </div> 
    </div> 
</div> 
+1

感謝達米安!它解決了我的問題! –