@mixin main-lang-bg($width, $height, $preUrl, $posUrl) { width: $width; height: $height; background-repeat: no-repeat; background-size: 100% 100%; @include loop-lang-bg($preUrl, $posUrl); } // 背景图多语言 @mixin loop-lang-bg($preUrl, $posUrl) { $list: zh-cn, en-us; @each $i in $list { &.#{$i} { background-image: url('#{$preUrl}/#{$i}/#{$posUrl}'); } } } @mixin center { display: flex; flex-direction: column; align-items: center; justify-content: center; }