Use reqestAnimationFrame to Smoothly Move elements MDN: Window.requestAnimationFrame() Using requestAnimationFrame