Fun ways to animate CSS gradients

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI14 min

About this video

Shows how to animate CSS gradients by combining background-position with background-size, since gradients cannot be transitioned directly. Covers a button hover effect, an animated page body and a gradient applied to text.

What you’ll learn

  • Animate a CSS gradient with background-position and background-size
  • Build a gradient hover effect for buttons
  • Apply an animated gradient to text