flex弹性盒布局
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin:0;
padding:0;
box-sizing: border-box;
}
.box{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.top{
width: 100%;
height: 60px;
background: brown;
}
.middle{
flex: 1;
width: 100%;
background: chartreuse;
}
.bottom{
width: 100%;
height: 30px;
background: cornsilk;
}
</style>
</head>
<body>
<div class="box">
<div class="top"></div>
<div class="middle">
<p>111111111</p>
<p>111111111</p>
<p>111111111</p>
<p>111111111</p>
</div>
<div class="bottom"></div>
</div>
</body>
</html>