+ 1
In JavaScript how do you move the animation up and down
var t = setInterval(move, 10); var position = 0; var box = document.getElementById("box") function move( ) { if(position >= 300) { var x = setInterval(go, 10) function go(){ position -+= 1 box.style.right = position + "px" }
3 Antworten
+ 1
https://code.sololearn.com/Wys9sCI87AvL/?ref=app
0
Predator
Use css top property to move a box up and down.
https://code.sololearn.com/Wdrep3M5X2cW/?ref=app