由于我们使用了 flex 属性,您已经可以通过几行 CSS 代码轻松地操作顺序。
例如:
-
默认顺序

-
自定义顺序

CSS 示例:
.custom-header-links li {
&:nth-child(1) {
order: 3;
background: red;
}
&:nth-child(2) {
order: 1;
background: green;
}
&:nth-child(3) {
order: 2;
background: yellow;
}
}

