0

I'm trying to fade out an element with anime.js. The code works but the duration does not correspond with the duration param I'm giving.

For example when I set duration to five seconds, it takes about half of that.

https://codepen.io/anon/pen/rYLRQq

 anime({
   targets: '.el',
   opacity: 0,
   duration: 5000
 });

Also there's a noticable difference in duration between firefox and chrome.

Is there a way to have it more accurate?

tomeraz
  • 193
  • 3
  • 15

1 Answers1

1

It might seem like it doesn't correspond with giving parameter, but it actually does.

The thing is, that the default easing is 'easeOutExpo' or some other 'easeOut' timing function.

Try easing: 'linear' and you'll see the difference.