<style>
.flex{ display: flex; }
</style>
<div class="flex">
<div class="item">1</div>
<div class="item">2</div>
</div>
.container {
display: flex;
}
.container {
flex-direction: row | row-reverse | column | column-reverse;
}
.container{
flex-wrap: nowrap | wrap | wrap-reverse;
}
/* только flex-direction */
flex-flow: row;
flex-flow: row-reverse;
flex-flow: column;
flex-flow: column-reverse;
/* только flex-wrap */
flex-flow: nowrap;
flex-flow: wrap;
flex-flow: wrap-reverse;
/* сразу оба значения: flex-direction и flex-wrap */
flex-flow: row nowrap;
flex-flow: column wrap;
flex-flow: column-reverse wrap-reverse;
.container {
justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly | start | end | left | right ... + safe | unsafe;
}
.container {
align-content: flex-start | flex-end | center | space-between | space-around | space-evenly | stretch | start | end | baseline | first baseline | last baseline + ... safe | unsafe;
}
.container {
align-items: stretch | flex-start | flex-end | center | baseline | first baseline | last baseline | start | end | self-start | self-end + ... safe | unsafe;
}
.item {
flex-grow: <number>; /* по умолчанию 0 */
}
.item {
flex-shrink: <number>; /* по умолчанию 1 */
}
.item {
flex-basis: <length> | auto; /* по умолчанию auto */
}
.item {
flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
}
.item {
align-self: auto | flex-start | flex-end | center | baseline | stretch;
}
.item {
order: <integer>; /* по умолчанию 0 */
}