1. 問題描述:
各位大牛午安,最近在使用bootstrap製作一個圖片的Gallery,我使用了bootstrap 的 Grid sysyem。我發現只要有圖片的高度與周邊圖片的高度不一,整個gallery就會多出很多空白(上下的距離不一),請問要如何調整成像是 Unsplash 這個網站的樣子?
2. 相關代碼:
<div class="row text-center" style="display:flex;flex-wrap:wrap;">
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="thumbnail">
<img src=image.jpg>" >
<div class="caption">
<h3>description</h3>
</div>
</div>
</div>
</div>
3.相關截圖:
如果照片的height越大,差距會越大。
4.已嘗試的做法:
在style中改變 display。
style="display:flex;flex-wrap:wrap;"
該如何調整grid 的上下距離?
为什么不给图片设置一个百分比