Chapter 9. Animation and Interactivity

In This Chapter

  • What Is SVG Animation?

  • The Animation Elements

  • Timing an Animation

  • Interactivity

  • Conclusion

Up to this point, this book has concentrated on static SVG graphics. But SVG also has sophisticated animation and interactivity capabilities. This chapter will focus on giving life to SVG creations by animating them.

SVG can be animated in two ways, by using declarative SVG animation, which uses SVG's own animation elements, and by scripting animation, using a scripting language such as JavaScript. Because SVG's animation capabilities are quite extensive, we will focus on declarative SVG animation. However, more complex interactive animations that require scripting will be investigated, as well.

Because ...

Get SVG for Web Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.