<body>
<header class="header">header高度固定86px</header>
<section class="mainBox">
<div class="leftBox">左侧自适应上下铺满</div>
<div class="rightBox">右侧自适应上下铺满,内容过量时右侧上下滚动即可
<li v-for="item in 70">测试-----往下滑</li>
</div>
</section>
<footer class="footer">@ footer固定高度40px</footer>
</body>
<style>
* {
margin: 0;
padding: 0;
}
.header {
width: 100%;
height: 60px;
position: absolute;
top: 0;
/*以上设置是重点必须的*/
background: rgb(30, 75, 69);
padding-left:50px;
color: #fff;
font-size:20px;
line-height: 80px;
}
.footer {
width: 100%;
height: 60px;
background: rgb(30, 75, 69);
color: #fff;
position: absolute;
bottom: 0;
/*以上设置是重点必须的*/
text-align: center;
line-height: 40px;
}
.mainBox {
width: 100%;
position: absolute;
top: 60px;
bottom: 60px;
/*以上设置是重点必须的*/
border:3px solid blue;
}
.mainBox .leftBox {
height: 100%;
width: 200px;
float: left;
margin-bottom: 40px;
overflow: auto;
/*以上设置是重点必须的*/
border: 2px solid green;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
text-align: center;
line-height: 40px;
}
.mainBox .rightBox {
height: 100%;
margin-left: 0;
/*以上设置是重点必须的*/
border: 2px solid crimson;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: auto;
text-align: left;
line-height: 40px;
}
</style>