Answers for "how to add animation to div js"

6

js add animation to element

document.getElementById('test').style.animation = 'fading 2s infinite'
Posted by: Guest on January-18-2021
-1

js add animation to element

document.getElementById("tunnel").animate([
  // keyframes
  { transform: 'translateY(0px)' },
  { transform: 'translateY(-300px)' }
], {
  // timing options
  duration: 1000,
  iterations: Infinity
});
Posted by: Guest on January-10-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language