flex布局:
<div class="father">
<div class="child1"></div>
<div class="child2"></div>
</div>
div.father{
display: flex;
background: #42b983;
height: 50px;
}
.child1{
width: 100px;
display: inline-block;
flex: none;
background: red;
}
.child2{
flex: 1;
width: 0;
background: blue;
}
div.father {
display: flex;
background: #42b983;
width: 100px;
height: 100vh;
flex-direction: column;
}
.child1 {
width: 100px;
height: 20vh;
flex: none;
background: red;
}
.child2 {
flex: 1;
width: 100px;
height: 0;
background: blue;
}