<div class='flex-box'>
<div class='variable'></div>
<div class='bottom'></div>
</div>
可以让上面的元素flex-start, 下面的元素flex-end
.flex-box {
display: flex;
min-height: 100%; /×保证父节点至少占满高度×/
flex-flow: row wrap;/×使用行布局,并可以换行。×/
width: 300px;
}
.variable {
width: 100%;
height: 100px; /×这个高度会不停改变×/
background: green;
align-self: flex-start;
}
.bottom {
width: 100%;
height: 50px;
background: blue;
align-self: flex-end;
}