RT,
ul中有若干li 一行两个li 两个li 自动适应 ul宽度
li多列
如何用Flexbox实现。
学习是最好的投资!
<ul class="flexcontainer"> <li>Something</li> <li>Fox Example</li> <li>All About Web</li> <li>Fox Example</li> <li>Something</li> <li>Fox Example</li> <li>Something</li> <li>Fox Example</li> </ul> .flexcontainer { width: 300px; display: flex; flex-flow: row wrap; } .flexcontainer li { width: 50%; background-color: pink; }
http://jsfiddle.net/bdm5d8p4/
For more information about flexbox, please refer to this article: http://segmentfault.com/a/1190000002910324.
http://jsfiddle.net/bdm5d8p4/
For more information about flexbox, please refer to this article: http://segmentfault.com/a/1190000002910324.