<html>
<head>
<style>
* {
padding:0;
margin:0;
}
html,body {
height:100%;
width:100%;
}
.wrap {
display:flex;
flex-direction:column;
}
.left {
width:100%;
background-color: green;
height:180px;
z-index: 999;
}
.content {
z-index: 0;
height:100%;
margin-top: -180px;
background-color: red;
}
p {
padding-top: 180px;
}
</style>
</head>
<body>
<div class="wrap">
<div class="left">a</div>
<div class="content">
<p>sss</p>
</div>
</div>
</body>
</html>
css上边固定,下面自适应布局
最新推荐文章于 2024-04-11 09:57:49 发布