Transitions and Animations in CSS

Book description

Add life and depth to your web applications and improve user experience through the discrete use of CSS transitions and animations. With this concise guide, you’ll learn how to make page elements move or change in appearance, whether you want to realistically bounce a ball, gradually expand a drop-down menu, or simply bring attention to an element when users hover over it.

Short and deep, this book is an excerpt from the upcoming fourth edition of CSS: The Definitive Guide. When you purchase either the print or the ebook edition of Transitions and Animations in CSS, you’ll receive a discount on the entire Definitive Guide once it’s released. Why wait? Learn how to make your web pages come alive today.

  • Understand and learn how to implement Disney’s 12 principles of cartoon animation
  • Learn which CSS properties you can animate and use in transitions
  • Apply CSS’s four transition properties and nine animation properties to your CSS elements
  • Use CSS keyframe animations to granularly control an element’s property values
  • Learn details that will save you hours of debugging and megabytes of unnecessary JavaScript

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. Safari® Books Online
    4. How to Contact Us
    5. Acknowledgments
  2. 1. CSS Transitions and Animations
    1. 12 Basic Principles of Animation
    2. Animation and Transition Considerations
  3. 2. Transitions
    1. CSS Transitions
    2. Fallbacks: Transitions Are Enhancements
    3. Transition Properties
      1. The transition-property Property
      2. The transition-duration Property
      3. The transition-timing-function Property
      4. The transition-delay Property
      5. The transition Shorthand Property
    4. In Reverse: Transitioning Back to Baseline
    5. Animatable Properties and Values
      1. How Property Values Are Interpolated
      2. Animatable Properties
      3. transition Events Revisited
  4. 3. Animation
    1. Keyframes
    2. Setting Up Your Keyframe Animation
    3. Keyframe Selectors
      1. Omitting from and to Values
      2. Repeating Keyframe Properties
      3. Animatable Properties
      4. Nonanimatable Properties That Aren’t Ignored
      5. Dynamically Changing @keyframes Animations
    4. Animated Elements
      1. The animation-name Property
      2. The animation-duration Property
      3. The animation-iteration-count Property
      4. The animation-direction Property
      5. The animation-delay Property
      6. Animation Events
      7. The animation-timing-function Property
      8. The animation-play-state property
      9. The animation-fill-mode Property
      10. The animation Shorthand Property
    5. Animation, Specificity, and Precedence Order
      1. Specificity and !important
      2. Animation Order
      3. Animation Iteration and display: none;
      4. Animation and the UI Thread
      5. Seizure Disorders
    6. Animation Events and Prefixing
      1. animationstart
      2. animationend
      3. animationiteration
    7. Other Considerations
      1. Printing Animations

Product information

  • Title: Transitions and Animations in CSS
  • Author(s): Estelle Weyl
  • Release date: April 2016
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491929834