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 22 of 50 · css

Keyframe Animations

Duration: 12 mins

Keyframe animations let you define a series of intermediate steps.

@keyframes slideIn {
  from { transform:translateX(-100%); opacity:0; }
  to   { transform:translateX(0);    opacity:1; }
}
.element { animation:slideIn 0.5s ease-out forwards; }

Animation properties:

  • animation-name, animation-duration, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, animation-fill-mode.

Example: Pulsing loader

@keyframes pulse {
  0%   { opacity:0.3; }
  50%  { opacity:1; }
  100% { opacity:0.3; }
}
.loader { animation:pulse 1.2s infinite; }
Previous: TransformsNext: Responsive Design – Media Queries