Another way to animate motion of an element from one position to another is to use a curve motion animation. The curve is specified as a matrix of X and Y coordinates which the element's motion will follow.
In this recipe, we will move a
div across a simple curve, with two sets of X and Y coordinates in the matrix list.
Here, we can see the key steps in this animation by looking at a selection of frames: