【发布时间】:2017-06-28 22:10:44
【问题描述】:
这是我正在处理的代码:
.container {
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 150px;
background-color: #cbcbcb;
}
<div class="container">
<div>should be on the TOP</div>
<div>should be on the BOTTOM</div>
</div>
我在 Firefox 中得到了可预测的结果:
但在 Chrome 中我得到了下一个结果:
为什么我在底部元素下得到这个空间?
可以通过将 css min-height 更改为 height 来修复它,但在我的上下文中,这里有 min-height 值很重要。
附:此行为仅在 Chrome 和 Canary 中重现,并且似乎仅在 Windows 上。
我的环境:Chrome 版本 56.0.2924.87(64 位)和 Win 10
【问题讨论】:
标签: html css google-chrome flexbox