如下代码
http://jsbin.com/cavusimoto/edit?html,css,output
简单的一行两列,用的-webkit-box-flex: 1
那么2列的宽度应该都是50%,可是实际情况是,文字多的那一列,宽度会更多一点。为什么呢?
伊谢尔伦2017-04-17 11:28:34
-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:
<p class="bb">1122234411222344112223441122234411222344</p>