<div class="box">
<div class="header">头部</div>
<div class="content">内容区</div>
</div>
.box {
display: flex;
flex-flow: column;
height: 100%;
}
.header {
background: pink;
height: 30px;//高度可以是任意的
}
.content {
background: #ccc;
flex: 1;
overflow-y: auto;
}
CSS填充剩余高度
最新推荐文章于 2024-07-09 16:38:59 发布