为所有 children 创建动画

Create animation for all children

我正在尝试为 .flow 的所有 children 创建动画,其中每个动画的延迟都在增加。我希望下面的代码可以工作,但显然 属性 值不支持插值。

for i in (1..6)
    .flow a:nth-child({i})
        animation 1s 0.{i}s fadeIn both

此代码适用于延迟,但不适用于 child 选择器。

for i in 0.1s 0.2s 0.3s 0.4s 0.5s 0.6s
    animation 1s {i}s fadeIn both

有什么想法吗?

在这种情况下您需要使用 ()

for i in (1..6)
  .flow a:nth-child({i})
    animation 1s (i / 10)s fadeIn both