订购弹性物品 [英] Ordering flex items
本文介绍了订购弹性物品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有这个:
.flex-container {
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
.flex-container > div {
background-color: DodgerBlue;
color: white;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
<div class="flex-container">
<div><a href="#">1</a></div>
<div><a href="#">2</a></div>
<div><a href="#">3</a></div>
</div>
如何使用flexbox来订购商品,所以布局会像这样?
How can I use flexbox to order the items, so the layout would be like this?
我无法更改HTML中div的顺序,因为它会危害其他视图的布局.
I cannot change the order of the divs in the HTML, since it would jeopardize the layout of a different view.
推荐答案
查看全文