<html>
<style>
.l-content {
display: grid;
grid-template-rows: 20px auto 100px;
height: 100%;
}
.l-top {
background-color: aqua;
}
.l-center {
overflow: auto;
background-color: red;
}
.l-center__info {
height: 200vh;
}
.l-bottom {
background-color: black;
}
</style>
<body>
<div class="l-content">
<div class="l-top">top</div>
<div class="l-center">
<div class="l-center__info">
xxxxx
</div>
</div>
<div class="l-bottom">bottom</div>
</div>
</body>
</html>
display-grid 内容滚动处理
最新推荐文章于 2024-03-20 17:38:36 发布