Skip to main content

Animating with CSS Keyframes

  • Chapter
Beginning CSS3
  • 1740 Accesses

Abstract

The CSS transitions covered in the preceding chapter create simple animations that smooth changes in an element’s properties from one state to another. But they’re limited to the transition between two points. The only influence you have over what happens between those points lies in the choice of timing function. The CSS Animations module (http://dev.w3.org/csswg/css3-animations/) goes much further by allowing you to define keyframes that specify what an element’s properties should be at each stage of the animation. As with transitions, it’s left up to the browser to work out how to animate a smooth change from one keyframe to the next. So, you need to create keyframes only for significant changes. But you have finer control over reverse transitions, and you can specify how many times the animation should run or make it repeat endlessly.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 David Powers

About this chapter

Cite this chapter

Powers, D. (2012). Animating with CSS Keyframes. In: Beginning CSS3. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4474-5_21

Download citation

Publish with us

Policies and ethics