Animate.css的自定义延迟时间

1,899 阅读1分钟

Animate.css为我们设定了固定的动画延迟时间

animate__delay-3s	3s
animate__delay-4s	4s
animate__delay-5s	5s

如果需要自定义延迟的时间,就自定义一个属性,在属性内写入

自定义属性名 {
  --animate-delay: 2s;
}

/* All delay classes will take half the time to start */
自定义属性名 {
  --animate-delay: 0.5s;
}

然后添加到设定了延时动画的元素上