How to set delay for animation

I know is easy but: When set with delay is display the start so the from state before start. How can make delay that way show nothing and do delay? Any idea?


You can give the element you are animating a class with “display: none” property.

Then, with JavaScript you can use setTimeout and in the function you can remove the class so the element is showing when the animation starts. Put the delay (in milliseconds) in setTimeout so that it is the same delay as your CSS animation.

1 Like

Thanks! Btw got a soluttion with visibility: hidden; :slight_smile: