Chapter 10. Canvas Animations

In the last chapter, we looked at one of the latest CSS3 styles: the transform, which enabled us to create animated rotations, skews, scales, and translates. In this chapter, we're going to look at one of the new additions to HTML5—the <canvas> element.

The best way to think of the <canvas> element is to treat it like the kind of canvas on which an artist would paint. We can draw simple lines or complex shapes using JavaScript API methods, and there is also support for images and text. The canvas is two dimensional at this point, but may be extended to include 3D support in the future.

The <canvas> element, first proposed and used by Apple, has been implemented by most common browsers, and is considered one of ...

Get jQuery 1.4 Animation Techniques Beginner's Guide 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.