<!DOCTYPE html>
<html>
<head lang="zh-CN">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS3 弹性盒布局</title>
<style>
*{margin: 0;padding: 0;box-sizing: border-box;}
.flex-container {
list-style: none;
display: -webkit-flex;
display: -moz-flex;
display: -o-flex;
display: -ms-flex;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.flex-item {
padding: 5px;
}
.flex-item:nth-child(1){order: -1;}
.flex-item:nth-child(2){order: -2;}
</style>
</head>
<body>
<ul class="flex-container">
<li class="flex-item">1<img src="http://placehold.it/300&text=10"></li>
<li class="flex-item">2<img src="http://placehold.it/300&text=20"></li>
<li class="flex-item">3<img src="http://placehold.it/300&text=30"></li>
<li class="flex-item">4<img src="http://placehold.it/300&text=40"></li>
<li class="flex-item">5<img src="http://placehold.it/300&text=50"></li>
<li class="flex-item">6<img src="http://placehold.it/300&text=60"></li>
</ul>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script>
</script>
</body>
</html>
DEMO