Explore the creation of CSS animations with the @keyframes rule. This collection details both the basic keyframe syntax and the subtleties of control via the animation shorthand, including duration, delays, and easing functions (cubic-bezier). Special attention is paid to performance: examples focus on animating GPU-accelerated properties (transform, opacity) and using will-change for optimization.
160 CSS @keyframes Examples
Micro-Animated SVG Icon Bar
demo & codeStatic icons are dead pixels; they occupy space but offer no soul. We believe that every interaction — no matter how small — is an opportunity to delight. This navigation bar transforms the mundane act of switching tabs into a tactile event. By embedding the animation logic directly into the SVG structure, we create a system that feels organic, responsive, and deeply crafted. It is not just about showing the user where they are; it is about rewarding them for arriving there.
Isometric Floating Layers Diagram
demo & codeThis Isometric Floating Layers Diagram is a visually striking React component designed to represent architectural stacks or multi-tiered systems. By combining SVG geometry with CSS animations, it creates a lightweight 3D isometric illusion. Each layer floats rhythmically, enhanced by vibrant gradients and drop shadows, making it perfect for landing pages explaining software infrastructure or service tiers.
Pure CSS Animated Scorbunny
demo & codeThis Pure CSS Animated Scorbunny showcases the power of CSS as an illustration tool. Without a single SVG or image file, it constructs a recognizable character using nested divs, gradients, and advanced border-radius manipulation. The character feels alive thanks to continuous idle animations (blinking eyes, wiggling ears) and a joyful reaction when the user hovers over it.
Animated CPU Circuit Loader
demo & codeThis Animated CPU Circuit Loader brings a hardware-inspired aesthetic to your loading states. It visualizes data processing as colorful pulses of energy traveling along printed circuit board (PCB) traces into a central processor. The effect creates a sense of high-tech activity, perfect for dashboards, tech blogs, or system status pages.
Skeuomorphic Retro Power Buttons
demo & codeSkeuomorphic design meets modern web animation in these Windows XP-inspired power buttons. This component utilizes detailed CSS shadows to create a tactile 3D effect, paired with SVG path manipulation for playful micro-interactions upon interaction.
Bouncy Digital Block Clock
demo & codeThis Bouncy Digital Block Clock transforms a standard time display into a playful, tactile UI element. It utilizes a split-digit technique where numbers “roll” into place while their container physically bounces, adding weight and character to every second that passes. The component is fully responsive, supports system dark mode automatically, and ensures accessibility via dynamic ARIA labels.
Staggered Bars Reveal Animation
demo & codeThis Staggered Bars Reveal Animation creates a cinematic intro for landing pages using zero JavaScript. By orchestrating a single pseudo-element (::after) with complex linear-gradient backgrounds, the component simulates seven distinct bars sliding into place. The animation cleverly shifts the background-position of each gradient strip sequentially, creating a rhythmic “wipe” effect that culminates in the text appearing.
Blooming Night Garden Animation
demo & codeThis Blooming Night Garden Animation is a delightful example of “CSS Art,” where HTML elements are shaped into complex illustrations using code. It features a complete scene with a textured night sky, procedurally blooming flowers, swaying grass, and a particle system of floating hearts, all brought to life through choreographed CSS keyframes.
React SVG Fireworks Celebration
demo & codeThis React SVG Fireworks Celebration component delivers a festive visual experience without the overhead of heavy animation libraries like GSAP or Framer Motion. By combining React’s component composition with the lightweight performance of native CSS animations and SVG vector graphics, it renders crisp, scalable explosions suitable for congratulations screens or holiday themes.
Micro-Interaction Loading Button
demo & codeThis Micro-Interaction Loading Button demonstrates how to pack multiple feedback states into a single UI element without cluttering the interface. It starts as a clean “Submit” button. Hovering reveals a directional arrow, hinting at action. Clicking triggers a seamless loading sequence where the arrow transforms into a spinner, finally resolving into a checkmark to confirm success.
Let's Jump to Conclusions
A playful kinetic typography animation where words sequentially crouch, leap with a flip, and land softly, simulating the physical action of “jumping to conclusions.”
See the Pen Let's Jump to Conclusions.
Moiré Psy-Dance Party VIP Access Card (CSS Only)
A psychedelic 3D VIP card animation powered by pure CSS.
See the Pen Moiré Psy-Dance Party VIP Access Card (CSS Only).
Snake Game Preloader
A nostalgic, infinite animation of the classic Snake game in a pixel-art style, running entirely on CSS/SVG without scripts.
See the Pen Snake Game Preloader.
Infinite Loader on Top
A pure CSS infinity loader relying on SVG <use> for geometry reuse. Movement is driven by stroke-dashoffset, while synchronized opacity animations simulate 3D depth at the crossover.
See the Pen Infinite Loader on Top.
Up Arrow
A rectangular button smoothly shrinks into a circle, the text fades out, and an upward-pointing arrow begins to cyclically rise within it.
See the Pen Up Arrow.
List Styles 2
An interactive grid of task cards where clicking a counter button triggers a card-swap animation, revealing a hidden sub-list from behind the main item using z-index manipulation and CSS transforms.
See the Pen List Styles 2.
Bouncy CSS Text Animation with Splitting.js
A playful typographic vignette where Splitting.js enables granular CSS control, while complex @keyframes orchestrate a physics-based liquid dot that physically interacts with specific letters via data-char attributes.
See the Pen Bouncy CSS Text Animation with Splitting.js.
Animated Countdown
An energetic countdown animation orchestrated by JavaScript animationend events. CSS keyframes drive complex rotation and translation transforms with an elastic feel, creating a seamless chain reaction where numbers swing in and out before revealing the final “GO!” message.
See the Pen Animated Countdown.
Incrementing Counter
A dynamic and engaging statistics block that creates a sense of activity and popularity through running numbers and background animation.
See the Pen Incrementing Counter.
Kinetic CSS Loader
A smooth, rhythmic, and mesmerizing loader that looks complex but is implemented simply and efficiently.
See the Pen Kinetic CSS Loader.
Skull Toggle (CSS)
A playful skeleton toggle switch animated purely with CSS. The skull handle slides via @keyframes triggered by the :checked state, while a complex hand assembly - constructed from gradients and box-shadows - slides in to “push” the toggle, creating a whimsical, interactive narrative without JavaScript.
See the Pen Skull Toggle (CSS).
Toast Notification
A fully functional, visually pleasing notification system ready for integration into web apps to provide user feedback.
See the Pen Toast Notification.
Transaction List with View Transitions
A seamless master-detail interface leveraging the native View Transitions API to animate structural DOM changes without external libraries.
See the Pen Transaction List with View Transitions.
Futuristic Card Effect
A high-tech, cinematic profile card that responds to interaction with complex text animation, immersing the user in a sci-fi atmosphere.
See the Pen Futuristic Card Effect.
Jiggly Radio Buttons
A playful radio button component featuring a “jelly” physics simulation.
See the Pen Jiggly Radio Buttons.
Organic Button
A mesmerizing, organic UI element that feels alive and constantly shifting, engaging the user in a visual experiment.
See the Pen Organic Button.
CSS Hamburger Icons
A collection of 10 distinct hamburger menu animations, ranging from simple rotations to complex, multi-stage morphs.
See the Pen CSS Hamburger Icons.
Magic Todo List
A gamified task categorization UI built with React and TypeScript, featuring a continuously sliding conveyor belt of tasks.
See the Pen Magic Todo List.
Rating Stars
A sophisticated star rating component featuring fractional fills implemented via CSS clip-path. The JavaScript class generates SVG stars and orchestrates a staggered entrance animation, while SCSS keyframes drive complex scale, rotate, and shockwave effects for a tactile, gamified feel.
See the Pen Rating Stars.
Stroke Logo Animation
An elegant, fluid, and hypnotic logo reveal animation that looks professional and draws attention to the branding.
See the Pen Stroke Logo Animation.
Tab Bar Interaction with Dark Mode
A lively, responsive interface that turns boring navigation into a playful experience, where every user action is rewarded with delightful visual feedback.
See the Pen Tab Bar Interaction with Dark Mode.
Creative Section Design
A visually rich, animated section with cards that respond to hover (a colored border appears), creating a sense of interactivity and depth.
See the Pen Creative Section Design.
Interactive Card with Floating Lightbox Images
A lively, immersive page where the central element grabs attention with a flip effect, while the background creates a weightless atmosphere with clickable details to explore.
See the Pen Interactive Card with Floating Lightbox Images.
RGB Dot Preloader
A hypnotic, kaleidoscopic loader where white dots decompose into their RGB constituents during motion, generating a sensation of energy and complexity.
See the Pen RGB Dot Preloader.
CSS Rage Button
A playful button that shakes, reddens, and “curses” with increasing intensity upon each click (or hover for the secondary button), visualizing a gradual loss of composure.
See the Pen CSS Rage Button.
Playful Toss Toggle Switch
A playful, tactile toggle switch where the container seemingly ‘spits out’ or lobs the indicator ball to the opposing side.
See the Pen Playful Toss Toggle Switch.
Pure CSS Moiré Wave Dots
A dynamic field of black dots moving synchronously yet phase-shifted in time, forming complex geometric patterns reminiscent of moiré.
See the Pen Pure CSS Moiré Wave Dots.
Volumetric 3D CSS Toggle Switch
A volumetric 3D toggle switch orchestrated via the CSS Checkbox Hack and sibling combinators, requiring minimal JavaScript. The segmented background creates a cascading flip effect using rotateX and inline transition-delay, while keyframes drive two spheres in a complex orbital path through depth using translateZ and perspective to swap positions.
See the Pen Volumetric 3D CSS Toggle Switch.
Interactive Grid with Gooey Blob Effect
This interactive grid showcases a mesmerizing “gooey” or “metaball” effect, achieved by applying an SVG filter to a liquid-like blob that smoothly follows the cursor. The entire experience is powered by a sophisticated combination of technologies: requestAnimationFrame for the performant cursor tracking, and SCSS using @for loops and custom functions to create unique, non-repeating @keyframes for each block’s animation.
See the Pen Interactive Grid with Gooey Blob Effect.
Pure CSS Liquid Wave Illusion
This demo creates a captivating liquid wave illusion using a single ::before pseudo-element inside multiple overflow: hidden containers. The fluid motion is the result of two simultaneous @keyframes animations - one controlling top and the other transform: rotateZ.
See the Pen Pure CSS Liquid Wave Illusion.
Text Reveal with Splitting.js
This demo is a showcase of Splitting.js, a library that splits HTML elements into granular parts for detailed animation. The “Course Clear” heading is split into individual characters, and a grid overlay is created with data-splitting="cells", allowing for complex, staggered animations on each part.
See the Pen Text Reveal with Splitting.js.
CATS Pets Store Hero Section
This cinematic hero section employs Vue.js reactivity to orchestrate a continuous background image rotation system, where cat photos dynamically swap with sequenced enter/exit animations while geometric typography skews dramatically above.
See the Pen CATS Pets Store Hero Section.
Sign Up and Sign In Toggle Form
A dual-panel form where JS acts as a simple state trigger, using classList.toggle to apply .animate classes. The entire complex transition is driven by CSS @keyframes, which choreograph separate transform and z-index animations for content and a background image.
See the Pen Sign Up and Sign In Toggle Form.
Cascading Image Slider
An elegant slider where the entire scrolling logic is built not on transforms, but on DOM manipulation. JavaScript uses appendChild and prepend to reorder the elements, and CSS instantly picks up the changes via :nth-child and transition to create a smooth, cascading effect.
See the Pen Cascading Image Slider.
CSS Snowfall Effect with Sass Generator
Sass Generator uses @for loops and the random() function to bulk-create 350 unique snowflake CSS classes in three sizes. This pure CSS solution for snowfall combines fall (movement with rotation) and flickr (opacity blinking) animations, utilizing vw and vh in keyframes for realistic chaotic motion and responsiveness without using JavaScript.
See the Pen CSS Snowfall Effect with Sass Generator.
Minimalist CSS Toggle Switch
This is a pure CSS toggle switch, utilizing :before and :after pseudo-elements to render the track and thumb. It demonstrates effective state management via the :checked pseudo-selector and smooth transitions on all elements for a highly responsive and clean effect.
See the Pen Minimalist CSS Toggle Switch.
Random SVG Snowflake Generator
A snowflake generator in pure JS that creates unique SVG shapes on the fly. The geometry of each arm is determined by random parameters in a <path>, and symmetry is achieved through efficient cloning using the <use> tag.
See the Pen Random SVG Snowflake Generator.
CSS Cat Illustration with Tracking Eyes
An illustration of a cat created entirely in CSS, featuring interactive eyes that follow the cursor. JavaScript uses Math.atan2 to calculate the gaze angle, while all of the cat’s details - from the body to the whiskers - are implemented using pseudo-elements, box-shadow, and gradients.
See the Pen CSS Cat Illustration with Tracking Eyes.
Single Div CSS Computer
A demonstration of pixel art creation using only CSS gradients and box-shadow animation, without a single image file or extra HTML elements.
See the Pen Single Div CSS Computer.
Dynamic Notification Queue
Manage a dynamic queue of notifications with precise CSS transform: translateY stacking; dismissed items trigger a CSS flyOut animation before scheduled removal and the immediate recalculation of all remaining note positions via shiftNotes.
See the Pen Dynamic Notification Queue.
Progress Button Microinteractions
An animated loader button using jQuery and SCSS, where progress is implemented via an @for loop that generates 101 linear-gradient rules - the state is changed through a custom attribute updated by JS.
See the Pen Progress Button Microinteractions.
Skeuomorphic Stopwatch
A skeuomorphic stopwatch built with modern CSS features - CSS Grid for the dial layout, linear-gradient and box-shadow for a realistic look, and animation control managed through CSS variables.
See the Pen Skeuomorphic Stopwatch.