1const element = document.querySelector(".yourElementClass");
2const btn = document.querySelector(".yourButtonClass");
3
4btn.onclick = () => {
5 element.style.animation = "YourAnimation 1s linear infinite"
6}
7// you will need js to start an animation, Don't forget to declare it using css