Are javascript (timeout, interval) and css (animation, delay) synchronized?
For instance:
#anim1 { animation: anim1 10s linear; display: none; } anim1.style.display = "block" ; setTimeout(function() { anim2.style.webkitAnimation= 'anim2 10s linear'; }, 10000);
Will anim2 exactly run at the end of anim1? Does it depend on the browser? In this case, I'm more interested in the focus of webkit.
Note that anim1 runs through javascript to avoid loading time inconsistencies.
NB . This is a theoretical question, the code above is an illustration, and you should not use it at home, as there are more suitable means for this.
source share