方法一:
body{
margin: 0;
}
.container{
height: 300px;
overflow: hidden;
}
.left{
200px;
height: 300px;
background: red;
position: absolute;
left:0;
top: 0;
}
.right{
margin-left:200px;
100%;
height: 300px;
background: green;
}
<div class="container">
<div class="left"> </div>
<div class="right"> </div>
</div>
方法二:
body{
margin:0;
}
#wrapper{
height: 300px;
overflow: hidden;
}
.left{
200px;
height: 100%;
background: red;
float: left;
}
.right{
100%;
height: 100%;
float: right;
background: green;
margin-right: -200px;
}
<div id="wrapper">
<div class="left">
</div>
<div class="right">
</div>
</div>