+ 5

Animation-play-state property works only once

How can I make it to work multiple times https://code.sololearn.com/WBTMMq4iJoxg/?ref=app

12th Oct 2020, 1:29 PM
Kashyap Kumar
Kashyap Kumar - avatar
3 Answers
+ 2
My guess is that it is happening because animation is already defined, it won't run again. I edited code and it works as you want but with a different approach.
12th Oct 2020, 2:38 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
If you want it to run forever then set animation-iteration-count to 'infinite' and animation-play-state to 'running'. https://code.sololearn.com/W2O0bYfX8zhR/?ref=app
12th Oct 2020, 1:49 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
RDC no I don't want to run it forever. I want to run only on click.
12th Oct 2020, 2:14 PM
Kashyap Kumar
Kashyap Kumar - avatar