.animate javascript code example
Example 1: javascript animate elements
document.getElementById("tunnel").animate([
// keyframes
{ transform: 'translateY(0px)' },
{ transform: 'translateY(-300px)' }
], {
// timing options
duration: 1000,
iterations: Infinity
});
Example 2: js animation
You can learn js animation from here
https://www.w3schools.com/howto/howto_js_animate.asp