Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
CSS Animations
So, I have just learnt how to make CSS animations, however I am struggling with using javascript to control it. Like if you type in the number 56 it moves but I am unsure of how to do that. I tried but failed could someone please help. Below is the link! https://code.sololearn.com/W66SVq4CZYdu/#css
2 Answers
+ 2
ok thanks
+ 1
add this line in your function qwerty.classList.toggle("animate")
and paste this code in your css.. and remove the one from the div css
.animate{
-webkit-animation-name: example; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
animation-name: example;
animation-duration: 4s;
}