1.justify-content:弹性盒子在主轴方向上的排列方式,例子
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<style type="text/css">
.flex-box {
display: flex;
justify-content: space-around; // 主轴方向如何排列
align-content: space-around; // 侧轴方向如何排列,多行无效
align-items: center; // 侧轴方向如何排列,多行有效
width: 500px;
height: 500px;
flex-wrap: wrap;
border: 1px solid blue;
}
.item {
width: 100px;
height: 200px;
border: 1px solid red;
}
</style>
</head>
<body>
<div class="flex-box">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</body>
</html>
justify-content: space-around
align-content: center
align-items: center