4
我想寬度添加到flex元素。我提供了flex-basis:20%
。我怎樣才能得到下一行/第6行和第7行?爲什麼在提供彈性基礎時,彈性元素不會進入下一行?
下面的添加便箋鏈接:scratchpad.io
#wrapper {
display: flex;
}
.children {
flex-basis: 20%;
border: 1px solid;
}
<div id="wrapper">
<div class="children">
1
</div>
<div class="children">
2
</div>
<div class="children">
3
</div>
<div class="children">
4
</div>
<div class="children">
5
</div>
<br>
<div class="children">
6
</div>
<div class="children">
7
</div>
</div>
在此先感謝。
相關資源kukkuz答案:Flexbox的上SO文檔】(http://stackoverflow.com/documentation/css/445/flexible-box -layout-Flexbox的#噸= 2016121510252967663&一個=備註資源-1) – FelipeAls