In addition to the hint from Sahil, I would say that a simple animation is easier to realize with inline SVGs.
No background image is required for your example.
Otherwise, I recommend the work and tutorials by Chris Gannon:
and my favorite
Happy tweening ...