使用scss @for 循环生成 .font-size-12 到 .font-size-30 @for $i from 6 through 15 { .font-size-#{$i}{ font-size: (2px * $i); }}