10 ANIMATED SLIDESHOW

What this chapter covers:

  • Defining animation
  • Enhancing with animation
  • Making movement smoother

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

What is animation?

In the last chapter, I 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 help. If you want to change an element's style information over time, you'll need to use JavaScript. JavaScript allows you to execute functions at set intervals. This means that you can alter an element's style with the ...

Get DOM Scripting: Web Design with JavaScript and the Document Object Model 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.