Stanislau Zibovich, EPAM
<div class="container">
<div class="item">x</div>
<div class="item">x</div>
<div class="item">x</div>
<div class="item">x</div>
</div>
.container {
overflow:hidden;
height:640px;
}
.container .item {
float:left;
}
.container {
display:flex;
}
.container {
display:flex;
flex-direction:row; /* по умолчанию */
:row-reverse;
}
.container {
display:flex;
flex-direction:column;
}
.container {
display:flex;
flex-direction:column-reverse;
}
.container {
justify-content:flex-start; /* по умолчанию */
center;
flex-end;
}
.container {
justify-content:space-between;
space-around;
}
.container {
align-items:flex-start; /* по умолчанию */
flex-end;
center;
}
.container .item:nth-child(1) {
align-self:flex-start;
}
.container .item:nth-child(4) {
align-self:flex-end;
}
.container {
display:flex;
}
.item {
margin:auto;
}
.container .item {
flex-grow:1;
}
.container div {
flex-grow:1;
}
.container .item:nth-child(1) {
flex-grow:4;
}
.container .item:nth-child(1) {
flex-shrink:4;
}
.container .item {
flex-grow:1;
}
.container .item:nth-child(1) {
flex-basis:250px;
}
.container .item:nth-child(2) {
order:1;
}
.container {
display:flex;
flex-wrap:nowrap; /* по умолчанию */
:wrap;
}
.container {
display:flex;
flex-wrap:wrap-reverse;
}
.container {
display:flex;
align-content:stretch; /* по умолчанию */
:center;
}
Только для многострочных блоков!
E {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
E {
-webkit-box-orient:vertical;
-webkit-box-direction:reverse;
-moz-box-orient:vertical;
-moz-box-direction:reverse;
-ms-flex-direction:column-reverse;
-webkit-flex-direction:column-reverse;
flex-direction:column-reverse;
}
E {
display: table;
}
E .item {
display: table-cell;
width: 50%;
}