感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="top">顶部,高度60px</div>
<div class="mainBox">
<div class="leftBox">左盒子,固定宽度200px,高度自适应铺满屏幕剩余高度</div>
<div class="rightBox">右盒子,距离左盒子20px,高度自适应宽度自适应铺满屏幕剩余高度</div>
</div>
<div class="bottom">底部,高度40px</div>
</body>
</html>
输入 JavaScript 代码……
xxxxxxxxxx
*{
margin:0;
padding:0;
}
.top {
width: 100%;
height: 60px;
background: #000;
color:#fff;
position:absolute;
top:0;
/*以上设置是重点必须的*/
text-align:center;
line-height:60px;
.bottom{
width:100%;
height:40px;
background:#000;
bottom:0;
line-height:40px;
.mainBox{
top:60px;
bottom:40px;
.mainBox .leftBox{
height:100%;
width:200px;
float:left;
margin-bottom:40px;
overflow: auto;
border:6px solid green;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
.mainBox .rightBox{
margin-left:220px;
border:6px solid crimson;