2016-03-02 57 views
0

我目前正在嘗試適合圖像邊框,不幸的是bootstrap並不容易。看起來他們在防止邊界擬合的列中添加了填充。我不確定是否有辦法在不刪除填充引導程序提供的情況下執行此操作。這裏是我的代碼適合邊框圖像引導

<section class="part2"> 
    <div class="container"> 
    <div class="row"> 
<img src="/wp-content/themes/creativeforces/images/kid2.jpg" class="resize-image col-sm-4" id="image1" alt=""> 
    <img src="/wp-content/themes/creativeforces/images/kid2.jpg" class="resize-image col-sm-4" alt=""> 
    <img src="/wp-content/themes/creativeforces/images/kid2.jpg" class="resize-image col-sm-4" alt=""> 
    </div> 
     <div class="row"> 

     <div> 
      <p class="text-center col-md-4">Teach</p> 
     <div> 
      <p class="text-center col-md-4">Read</p> 
     </div> 
     <div> 
      <p class="text-center col-md-4">Play<p> 
     </div> 

    </div> 


    </div> 
</section> 



.part2{ 
    background-color: #EEEEEE; 
    // width:100%; 
margin-top: 30px; 
padding-bottom: 20px; 
padding-top: 20px; 

} 

#image1{ 
    border: 3px solid #000; 
} 

正如你所看到的,圖像周圍沒有適當的邊框。 enter image description here

任何幫助將不勝感激!

回答

1

我以前有過這個問題,我把圖像填充掉了。它從未以任何方式影響我的設計。

正如你可能知道,你只想補充:

#image1{ 
    border: 3px solid #000; 
    padding: 0; 
} 

我也做了一些挖你問你的問題後,它似乎像別人建議刪除填充。

Bootstrap unwanted image padding