左右高度自适应
1.先用一个大盒子A包裹 盒子 L(盒子左),R(盒子右);
2.A盒子display: inline-block;border-left: (盒子L的宽度) solid (盒子L
的背景颜色);
3, L(盒子左),R(盒子右)全部有浮动;
4, L(盒子左)margin-left:-(L盒子左的宽度)
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<style>
.wai{
background: #ccc;
}
.nei{
display: inline-block;
border-left:200px solid #a8a8d8;
vertical-align: bottom;
}
.left{
width: 200px;
margin-left: -200px;
height:auto;
float: left;
}
.right{
float: left;
}
</style>
</head>
<body>
<!--<div class="wai">-->
<div class="nei">
<div class="left">这是左边内容</div>
<div class="right">这是右边内容</div>
</div>
<!--</div>-->
</body>
</html>