js html element animation code example
Example 1: js add animation to element
document.getElementById('test').style.animation = 'fading 2s infinite'
Example 2: js add animation to element
let rotate360 = [
{ transform: 'rotate(360deg)' }
];
document.getElementById('test').style.animation = 'fading 2s infinite'
let rotate360 = [
{ transform: 'rotate(360deg)' }
];