【属性flex-direction:row,row-reverse,column,colmn-reverse】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.container{
display: -webkit-flex;
display: flex;
/*-webkit-flex-direction:row-reverse;*/【使用flex-direction属性,将能控制子元素盒子排序】
/*flex-direction: row-reverse;*/
width: 400px;
height: 250px;
background-color:lightblue;
}
.flex-item{width: 100px;height: 100px; margin: 10px; background-color: lightyellow;}
</style>
</head>
<body>
<div class="container">
<div class="flex-item">盒子1</div>
<div class="flex-item">盒子2</div>
<div class="flex-item">盒子3</div>
</div>
</body>
</html>
正常排序
使用flex-direction:row-reverse之后的排序