私はページのレイアウトにフレックスボックスを使用しています。成長している行動は有用です。しかし、私は完全に防止したいのです収縮行動。
とにかくこれを管理しますか?
コード例:
<div class="flex-vertical-container">
<div class="flex-box">
This one should grow but not shrink
</div>
<div></div>
<div></div>
</div>
CS
.flex-vertical-container {
display: flex;
flex-direction: column;
}
.flex-box {
flex: 1;
}
ベストアンサー1
プロパティflex-shrink
を に設定してみてください。0
.flex-box