flex-direction:
flex-wrap:

1
2
3
4
5
6

By default, flex items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.

<div class="container">
<div class="flex-item">1</div>
<div class="flex-item">2</div>
<div class="flex-item">3</div>
<div class="flex-item">4</div>
<div class="flex-item">5</div>
<div class="flex-item">6</div>
</div>

.container {
flex-direction: rowrow-reversecolumncolumn-reverse;
flex-wrap: nowrapwrapwrap-reverse;
}

Back