<head>
<style>
section {
display: flex;
width: 60%;
height: 150px;
background-color: cadetblue;
margin: 0 auto;
}
section div:nth-child(1) {
width: 100px;
height: 150px;
background-color: chartreuse;
}
section div:nth-child(2) {
/*中间盒子把剩余的一份全部分完*/
flex: 1;
background-color: darkmagenta;
}
section div:nth-child(3) {
width: 100px;
height: 150px;
background-color: darkkhaki;
}
</style>
</head>
<body>
<section>
<div></div>
<div></div>
<div></div>
</section>
</body>