Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. CSS Course

Lesson 16 of 50 · css

CSS Gradients Deep Dive

Duration: 8 mins

Gradients can be linear, radial, or conic (CSS 4). Syntax:

linear-gradient(to right, #ff7e5f, #feb47b);
radial-gradient(circle at center, #e0eafc, #cfdef3);
conic-gradient(from 90deg at 50% 50%, #ff0, #f0f, #0ff);

You can animate gradient stops with @keyframes for a shimmering effect.


Example: Animated gradient background

@keyframes hueShift {
  0%   { background-position:0% 50%; }
  50%  { background-position:100% 50%; }
  100% { background-position:0% 50%; }
}
.banner {
  background:linear-gradient(270deg, #ff6b6b, #f7d794, #5f27cd);
  background-size:600% 600%;
  animation:hueShift 12s ease infinite;
}
Previous: Backgrounds – Images & GradientsNext: CSS Filters