如下代码http://jsbin.com/cavusimoto/edit?html,css,output
简单的一行两列,用的-webkit-box-flex: 1那么2列的宽度应该都是50%,可是实际情况是,文字多的那一列,宽度会更多一点。为什么呢?
业精于勤,荒于嬉;行成于思,毁于随。
Just add width: 0;, those who add -webkit-box-flex: 1;
-webkit-box-flex: 1 means that the ratio of allocating the remaining width of the parent container is 1:1, not the total width of the parent container. If you write more content on the second sub-element, the effect will be obvious:
-webkit-box-flex: 1
<p class="bb">1122234411222344112223441122234411222344</p>
Just add width: 0;, those who add -webkit-box-flex: 1;
-webkit-box-flex: 1
means that the ratio of allocating the remaining width of the parent container is 1:1, not the total width of the parent container. If you write more content on the second sub-element, the effect will be obvious: