如何防止柔性盒收缩?

我有两个flexbox,它们在高度变化时缩小,嵌套内容重叠.

怎么预防这个? 最佳答案

just add flex-shrink:0 to your element and the flexbox will stop shrinking.

<div class="flx">
Some Content
</div>
<div class="flx">
Some Content
</div>
<style>
flx{
    display: flex;
    flex-shrink: 0;
}
点赞