我对SCSS不太熟悉,而downt知道在SCSS中应该如何使用下面的代码。我想增加每级20便士的保证金。
.level-1 {
margin-left: 0px;
}
...
.level-9 {
margin-left: 160px;
}发布于 2022-11-23 01:43:40
您可以使用for循环:
@for $i from 1 through 9 {
.level-#{$i} {
margin-left: 20px * ($i - 1);
}
}https://stackoverflow.com/questions/74538913
复制相似问题