1.弹性布局之九宫格
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>弹性布局</title>
<style>
.container {
display:flex;
width:500px;
height:auto;
justify-content:center;
flex-wrap:wrap;
border:1px solid green;
}
.item {
width:100px;
height:100px;
background-color:red;
}
</style>
</head>
<body>
<div class="container">
<div class="flex">1</div>
<div class="flex">2</div>
<div class="flex">3</div>
<div class="flex">4</div>
<div class="flex">5</div>
<div class="flex"> 6</div>
<div class="flex">7</div>
<div class="flex">8</div>
<div class="flex">9</div>
</div>
</body>
</html>