-1
輸出增量我試圖輸出如下:SASS for循環的15
.time15 {
width: 25%;
}
.time30 {
width: 50%;
}
.time45 {
width: 75%;
}
.time60 {
width: 100%;
}
.time75 {
width: 125%;
}
高達.time1440
這裏所有的方式是我的代碼:
$max: 60 * 24;
$step: 15;
@for $i from 15 through ceil($max/$step) {
$value: ($i - 1)*$step + 1;
$width: $value/60 * 100;
.time{$value} {
width: $value%
}
}
我雖然在嘗試編譯時遇到以下語法錯誤:
Error: Invalid CSS after "... &.time{$value": expected ":", was "} {"