nice js element animations code example
Example 1: js add animation to element
document.getElementById('test').style.animation = 'fading 2s infinite'
Example 2: javascript animate elements
document.getElementById("tunnel").animate([
// keyframes
{ transform: 'translateY(0px)' },
{ transform: 'translateY(-300px)' }
], {
// timing options
duration: 1000,
iterations: Infinity
});