O'Reilly logo

DOM Scripting: Web Design with JavaScript and the Document Object Model, Second Edition by Jeffrey Sambells, Jeremy Keith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. An Animated Slideshow

What this chapter covers:

  • The basics of animation

  • Web page enhancement with animation

In this chapter, you'll see one of the most dynamic applications of CSS-DOM: the ability to animate elements.

Animation basics

The previous chapter introduced the DOM's ability to update the styles attached to a document. Using JavaScript to add presentational information can save you time and effort, but, for the most part, CSS remains the best tool for the job.

There's one area, however, where CSS can't really help much. If you want to change an element's style information over time, you'll probably need to use JavaScript. CSS3 introduces a number of different transition methods that allow you to animate elements. However, currently, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required