1
我想阻止綠格(.c
)被按下時,容器外。格被推下來Flexbox的
http://codepen.io/anon/pen/vLpPRM?editors=1100
<section>
<div class="a">aaaaaaaa</div>
<div class="b">bbbbb</div>
<div class="c">ccccccccc</div>
</section>
section
display: flex
flex-wrap: wrap
width: 500px
height: 200px
background-color: peru
.a
width: 400px
height: 100px
background-color: gray
.b
width: 100px
height: 200px
background-color: tan
.c
background-color: green
height: 100px
width: 300px
可能重複:http://stackoverflow.com/questions/20977390/set-flexbox-children-to - 不同高度的可用空間 – chinaowl
只需將'flex-wrap'屬性更改爲'no-wrap' – Ferrrmolina