2
我在頁腳之前有以下div,我想均勻分佈一些div。目前我正在使用手動保證金百分比,但我想知道是否有辦法讓CSS自動將它們分配給空間?如何在div中均勻分佈多個div
CSS
#books {margin:10px auto;}
.bookimage {width:7%;
padding-top:7%;
display:inline-block;
margin:2%;
}
HTML
<div id="books">
<div class="bookimage"> </div>
<div class="bookimage"> </div>
<div class="bookimage"> </div>
<div class="bookimage"> </div>
<div class="bookimage"> </div>
<div class="bookimage"> </div>
<div class="bookimage"> </div>
<div class="bookimage"> </div>
</div>
http://stackoverflow.com/a/32122011/3597276 –