Answers for "css start animation"

1

css start animation

const element = document.querySelector(".yourElementClass");
const btn = document.querySelector(".yourButtonClass");

btn.onclick = () => {
  element.style.animation = "YourAnimation 1s linear infinite"
}
// you will need js to start an animation, Don't forget to declare it using css
Posted by: Guest on March-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language