用空间生成的循环的Scss

时间:2015-10-13 20:11:30

标签: css sass

我的sass代码有问题......

 @for $i from 1 through 3 {
      &:nth-child(#{$i}) { 
        transition: all (0.2*$i)s ease; 
      }
    }

它编译得像这样

label p:nth-child(1) {
  transition: all 0.2 s ease;
}
label p:nth-child(2) {
  transition: all 0.4 s ease;
}
label p:nth-child(3) {
  transition: all 0.6 s ease;
}

需要一次又一次地移除空间

感谢名单

0 个答案:

没有答案