1
我想提高我所有的我的元素的动画延迟增量,但我似乎无法得到正确的语法。我晚上采取正确的处理方法或我应该使用JS?干杯SCSS不会编译 - 动画延迟
http://codepen.io/2ne/pen/ycIpj
@for $i from 1 through 10 {
&:nth-child(#{$i}) {
animation-delay: (#{$i * 0.1})s;
}
}
我想提高我所有的我的元素的动画延迟增量,但我似乎无法得到正确的语法。我晚上采取正确的处理方法或我应该使用JS?干杯SCSS不会编译 - 动画延迟
http://codepen.io/2ne/pen/ycIpj
@for $i from 1 through 10 {
&:nth-child(#{$i}) {
animation-delay: (#{$i * 0.1})s;
}
}
你应该改变&
与li
,请看下面的代码:
@for $i from 1 through 10 {
li:nth-child(#{$i}) {
animation-delay:(#{$i*0.1s});
}
}
像这样的标记:
<li></li>
<li></li>
...
“基地级规则不能包含家长选择引用字符ACTER '&'“。
似乎工作分开形式我有一个动画延迟数字和's'值之间的空间 – 2ne
我把它固定在封闭的支架内 – 2ne
是的我只是意识到这一点,好抓! –