<div class= "container">
<div class="left"></div>
<div class="right"></div>
</div>
<style>
.container{
width:1000px;height:400px;border: 1px solid red;
}
.left{
width:200px;height:100%;background: gray;
float: left;
}
.right{
overflow:hidden;
background: green;
}
.container{
width:1000px;height:400px;border:1px solid red;
display:flex;
}
.left{
width:200px; height:100%;background:gray;
flex:none;
}
.right{
height:100%;background:green;
flex:1;
}
.container{
width:1000px;height:400px;border:1px solid red;
display:table;
}
.left{
width:200px; height:100%;background:gray;
display:table-cell;
}
.right{
height:100%;background:green;
display: table-cell;
}
.container{
width:1000px;height:400px;border:1px solid red;
}
.left{
width:200px;height:100%;background:gray;
float:left;
}
.right{
height:100%;background:green;
float:right;
width:calc(100% - 200px);
}
.container{
width:1000px;height:400px;border:1px solid red;
}
.left{
float:left;width:200px;border:1px solid red;height:100%;background:gray;
}
.right{
height:100%;border:1px solid blue;width:auto;margin-left:200px;
}
</style>
转载请注明原文地址: https://www.6miu.com/read-84263.html