+ 4

Code problem

Can someone explain why this code doesn’t animate the first block? https://code.sololearn.com/WiIupLb972zy/?ref=app

18th Oct 2018, 9:49 PM
Zachary Burkholder
Zachary Burkholder - avatar
2 ответов
+ 4
Use box.style.marginLeft instead of box.style.left. In order to left to work the elements needs a position.
18th Oct 2018, 10:43 PM
Toni Isotalo
Toni Isotalo - avatar
+ 4
Thanks alot!!
18th Oct 2018, 10:45 PM
Zachary Burkholder
Zachary Burkholder - avatar