Search⌘ K

Animated Gradient Background

Explore how to create a visually engaging animated gradient background using CSS. Learn to set up a linear-gradient with multiple color stops, define keyframe animations, and apply smooth background transitions without JavaScript. This lesson helps you enhance user interfaces with dynamic visual effects using pure CSS.

Problem description

Given an HTML page containing a <section class="gradient-bg"></section> element, write CSS to:

  • Apply a linear-gradient background with at least four distinct color stops.

  • Set the background-size ...