我试图递增地增加所有i元素的动画延迟,但我似乎无法正确地理解语法。我正在晚上采取正确的方法,还是应该使用js?干杯
http://codepen.io/2ne/pen/ycIpj
@for $i from 1 through 10 {
&:nth-child(#{$i}) {
animation-delay: (#{$i * 0.1})s;
}
}发布于 2014-02-14 00:36:34
您应该使用&更改li,请参见以下代码:
@for $i from 1 through 10 {
li:nth-child(#{$i}) {
animation-delay:(#{$i*0.1s});
}
}对于这样的标记:
<li></li>
<li></li>
...“基本级别规则不能包含父选择器-引用字符‘&’”。
https://stackoverflow.com/questions/21768574
复制相似问题