Skip to content
Advertisement

How to move a image smoothly with javascript?

I want to make an image move with a while loop in javascript but it isn’t working.

This is the javascript code:

JavaScript

The css code:

JavaScript

And the html:

JavaScript

Advertisement

Answer

You can try this approach as well.

JavaScript
JavaScript
JavaScript
Advertisement