Skip to Main Content
SVG for Web Developers
book

SVG for Web Developers

by Ellen Pearlman, Lorien House
December 2002
Beginner to intermediate content levelBeginner to intermediate
464 pages
8h 34m
English
Pearson
Content preview from SVG for Web Developers

The Animation Elements

There are five animation elements. These are:

  • <animate>

  • <set>

  • <animateColor>

  • <animateMotion>

  • <animateTransform>

We'll take a look at each element in turn.

The <animate> Element

The code for Example 9-1 showed an example of the <animate> element. This element is both the simplest to use and the most versatile SVG animation element. It animates one attribute or property over time. In Example 9-1, the <animate> element was used to animate the cx attribute of a circle to make the circle move horizontally. The code in Example 9-2 shows the <animate> element used to create a more complex animation. The rectangle in Example 9-2 grows, changes color from red to green, and increases in opacity over the duration of 8 seconds. The code ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with SVG

Building Web Applications with SVG

Jon Frost David Dailey and Domenico Strazzullo
SVG Text Layout

SVG Text Layout

Amelia Bellamy-Royds, Kurt Cagle
Using SVG with CSS3 and HTML5

Using SVG with CSS3 and HTML5

Amelia Bellamy-Royds, Kurt Cagle, Dudley Storey

Publisher Resources

ISBN: 0131004999Purchase book