Académique Documents
Professionnel Documents
Culture Documents
<div class=“container“>
<div class =“children“> <div class =“children“> <div class =“children“>
</div>
A NOTER : dans les exemples ci-dessous, la hauteur des enfants (height) n’est pas déclarée.
Directions flex-direction
avec justify-content
1 3
Lorem
1 2 ipsum
3 3 2 1 2 2
Justification justify-content
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
5 6 7 8 1 2 3 4
.container { flex-wrap: nowrap; } .container { flex-wrap: wrap; } .container { flex-wrap: wrap-reverse; }
6 5 4
3 2 1
.container { flex-flow: row-reverse wrap-reverse;}
1 2 3 4 3 2
4 5 6 1
.children { order: 0; } .children:nth-of-type(1) {order:4;}
.children:nth-of-type(2) {order:3;}
.children:nth-of-type(3) {order:2;}
.children:nth-of-type(4) {order:1;}
.children:nth-of-type(2) { flex-shrink: 2 ; }
https://jaetheme.com/blog/flexbox