javascript code for inserting animation code example
Example 1: js add animation to element
let rotate360 = [
{ transform: 'rotate(360deg)' }
];
Example 2: js add animation to element
document.getElementById("tunnel").animate([
// keyframes
{ transform: 'translateY(0px)' },
{ transform: 'translateY(-300px)' }
], {
// timing options
duration: 1000,
iterations: Infinity
});