我正在使用flexbox,并试图将子元素对齐到父元素的底部。我找不到解决方案。以下是我尝试过的示例。
.container {
display: flex;
flex-direction: column;
}
.top {
height: 70%;
}
.bottom {
height: 30%;
justify-content: flex-end;
}
<div class='container'>
<div class='top'>
<p>Content to go on top</p>
</div>
<div class='bottom'>
<p>Content to go on bottom</p>
</div>
</div>