固定数の列 (たとえば 4) を持つコンテナー内に動的な数のセルを配布することは可能ですか? 私がやりたいことは次のようなものです:
<div class="container_4">
<div class="cell">Cell 1</div>
<div class="cell">Cell 2</div>
<div class="cell">Cell 3</div>
<div class="cell">Cell 4</div>
<div class="cell">Cell 5</div>
<div class="cell">Cell 6</div>
<div class="cell">Cell 7</div>
</div>
4 つのセルごとに行の終了位置を指定しないと、次のようになります。
Cell 1 Cell 2 Cell 3 Cell 4
Cell 5 Cell 6 Cell 7