I have a parent div with 6 children divs as follows
123456
I want to have a result like this
1 3 5
您可以使用flexbox并更改:nth-child(odd)
项目的顺序:
.work-wrap {
display: flex;
flex-wrap: wrap;
}
.work-item {
width: 33%;
}
.work-item:nth-child(odd) {
order: 1;
}
1
2
3
4
5
6