<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>


本文展示了如何使用HTML和CSS创建一个具有顶部、中间内容区和底部的分段布局,适合内容社区的页面设计。

2906

被折叠的 条评论
为什么被折叠?



