XML technologies / SVG / Using animations / Summary, questions and exercises

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

Summary

  • Define an animation by inserting an animation tag into the tag you want to animate.

  • You can change colors and attributes or move elements along a path.

  • The tags’ attributes determine how long an animation lasts and when it starts.

Questions and exercises

The following exercises form a single unit.

  1. Create an SVG file and insert a 4 x 4 pixel square.

  2. Fill the square with a color of your choice.

  3. Insert a 10-second animation changing the fill from its current color to black.

  4. Follow it with another animation that enlarges the square to 8 pixels within 5 seconds.

  5. Add a line from 0/0 to 75/10 to the file.

  6. Move the square along this line. The animation should last 8 seconds, and the square should remain at its endpoint afterward.

   

 

 

 

back to top