主轴对齐方式:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
width: 1200px;
height: 400px;
background-color: pink;
margin: 100px auto;
/* 弹性容器 */
display: flex;
/* 主轴对齐方式 2遍靠边,中间自适应 */
/* justify-content: space-between; */
/* justify-content: space-around; */
/* justify-content: space-evenly; */
}
.box div{
width: 300px;
height: 400px;
background-color: aqua;
}
.box div:nth-child(2n){
background-color: green;
}
</s