css - Flexbox 怎么实现多行多列
PHPz
PHPz 2017-04-17 11:06:37
0
2
589

RT,

  1. ul中有若干li 一行两个li 两个li 自动适应 ul宽度

  2. li多列

如何用Flexbox实现。

PHPz
PHPz

学习是最好的投资!

reply all(2)
黄舟
<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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template