michalsnik / aos

Animate on scroll library
MIT License
26.53k stars 2.57k forks source link

AOS Custom Delay #558

Open nixks opened 4 years ago

nixks commented 4 years ago

Hi everyone,

I am in need of a custom delay option over the bountry of max 3000ms which is my only option at the moment.

I tried adding the following css:

body[data-aos-delay='8000'] [data-aos],
  [data-aos][data-aos][data-aos-delay='8000'] {
    transition-delay: 8s;
}

...but no luck. Animation starts at 3 seconds...

Any suggestions?

Thanks!

evankford commented 4 years ago

It looks like the CSS rule from the AOS library is applying the transition-delay once the aos-animate class has been added, so you may need to add that to your css rule, like so:

body [data-aos-delay='8000'][data-aos].aos-animate,
[data-aos][data-aos][data-aos-delay='8000'].aos-animate {
    transition-delay: 8s;
}