恐怕我不能理解弹性增长。如果你跳到下面的JSFiddle – 我理解它的方式,.big应该是其他.list-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>