<div class="father">
<div class="left">左边</div>
<div class="right">右边</div>
</div>
/***第一种
.father {
display: flex;
height: 200px;
}
.left {
width:200px;
}
.right {
flex: 1;
width: calc(100% - 200px);
}
*/
/***第二种
.father {
display: flex;
height: 200px;
}
.left {
width:200px;
}
.right {
width: calc(100% - 200px);
}
*/
.father {
position: relative;
height: 200px;
}
.left {
position: absolute;
width: 200px;
height: 100%;
}
.right {
width: calc(100% - 200px);
height: 100%;
margin-left: 200px;
}