Creating a moving 3d box with CSS transitions and Javascript (SO)