4
列應填充高度限制。它在Chrome中工作正常,但不在IE和Firefox中。CSS中的Colomn計數問題
在IE
和firefox
它均勻分佈而不是採取列的高度。我共有16個子divs
,我希望他們進來5 5 5 1,這是工作的罰款在chrome
(5 5 5 1)不firefox
和IE
(4 4 4 4)
這裏是我的代碼 -
<div class="example">
<div class="example-auto">1A</div>
<div class="example-auto">1B</div>
<div class="example-auto">1C</div>
<div class="example-auto">1D</div>
<div class="example-auto">2A</div>
<div class="example-auto">2B</div>
<div class="example-auto">2C</div>
<div class="example-auto">2D</div>
<div class="example-auto">3A</div>
<div class="example-auto">3B</div>
<div class="example-auto">3C</div>
<div class="example-auto">3D</div>
<div class="example-auto">4A</div>
<div class="example-auto">4A</div>
<div class="example-auto">4A</div>
<div class="example-auto">4A</div>
</div>
CSS
.example {
-webkit-columns: 4;
-moz-columns: 4;
columns: 4;
height:100px;
border: 1px solid rgba(0, 0, 0, 0.1);
padding: 0 0.5em;
}
.example-auto {
-webkit-column-fill: auto;
-moz-column-fill: auto;
column-fill: auto;
}