1
私はLESSでアニメーション遅延を生成しようとしています。最終結果はのようになります。しかし、それは動作しませんアニメーションがLESSで生成を遅らせます
@animation-delays: 10;
@animation-delay-step: .5; // delay in seconds
.animation-delays-loop (@i) when (@i > 0) {
[data-animation-step="@{i}"] {
@animation-delay = @animation-delay-step * @{i};
animation-delay: @animation-delay~"s";
}
.animation-delays-loop(@i - 1);
}
.animation-delays-loop (@animation-delays);
:
[data-animation-delay="1"] {
animation-delay: .5s;
}
[data-animation-delay="2"] {
animation-delay: 1s;
}
私のコードは次のようになります。問題はanimation-delay: @animation-delay~"s";
にあるようです。任意のアイデアを修正する方法は?
'1s 'を乗算しようとしましたか? – chazsolo
@chazsolo、ありがとう私は解決策を見つけました。 – sdvnksv