【发布时间】:2014-02-24 21:10:24
【问题描述】:
恐怕我一定不懂 flex-grow。如果你跳到下面的 JSFiddle——按照我的理解,.big 的大小应该是另一个.flex-item 的三倍。如您所见,并非如此。为什么?
.flex-container {
display:flex;
padding:0 20%;
}
.flex-item {
flex-grow:1;
list-style-type:none;
border:1px solid black;
}
.big {
flex-grow:3;
}
<ul class="flex-container">
<li class="flex-item big">Why isn't this exactly three times the size of the other one?</li>
<li class="flex-item">Not really working like expected I don't think...</li>
</ul>
【问题讨论】: