CSS keyframe animations are the most-used motion primitive on the web — every spinner, every shimmer, every breathing pulse, every infinite ticker runs on @keyframes. These 30 hand-coded animations cover every production pattern: loading spinners, typewriter text, bouncing ball, pulse glow, morphing blobs, particle bursts, waves, 3D flips, neon flicker, skeleton loading, glitch text, orbit, liquid fill, stagger lists, fire, ripple, floating elements, infinite ticker, countdown timers, path drawing, spotlight, spring bounce, confetti, breathing meditation, typewriter-delete loop, aurora borealis, card stacks, kinetic typography, morphing progress steps, and animated gradient mesh. All 100% pure CSS — zero JavaScript, zero libraries, zero dependencies. GPU-accelerated via transform + opacity (compositor-thread, 60fps on mid-tier mobile, INP-friendly), respect prefers-reduced-motion, MIT-licensed.

30 pure CSSPublished

Related20 CSS Rotate Animations22 CSS Transitions20 CSS Loading Animations16 CSS Bounce Animations

CSS Keyframe Loading Spinners — preview
01 / 30Pure CSS

CSS Keyframe Loading Spinners

Nine animated CSS loading spinners — ring, dual-rotate, dot orbit, morph shape, pulse dots, audio wave, comet trail, folding grid, and progress sweep — each driven by a single scoped keyframe.

Published

CSS Typing Typewriter Text Effect — preview
02 / 30Pure CSS

CSS Typing Typewriter Text Effect

Classic typewriter cursor, multi-word loop, code-line reveal and glitch-reveal text animations using CSS width + border-right keyframes only, zero JS.

Published

CSS Bouncing Ball Animation — preview
03 / 30Pure CSS

CSS Bouncing Ball Animation

Realistic bouncing ball physics with squash-and-stretch, pendulum swing, stagger trio and rolling ball — all driven by cubic-bezier keyframes, no JavaScript.

Published

CSS Pulse Glow Animation Button — preview
04 / 30Pure CSS

CSS Pulse Glow Animation Button

Nine glowing button animation styles: ripple pulse, neon glow, heartbeat, shimmer sweep, border spin, breath expand, lightning flash, radar sweep and glow bloom.

Published

CSS Morphing Blob Animation — preview
05 / 30Pure CSS

CSS Morphing Blob Animation

Six organic morphing blob animations — duo-colour, gradient shift, blend cluster, breathing ring and labelled blob — using staggered border-radius keyframes.

Published

CSS Particle Burst Animation — preview
06 / 30Pure CSS

CSS Particle Burst Animation

Four particle burst effects: shockwave rings, firework sparks, spinning petals and confetti rain — all pure CSS translate + scale keyframes, no canvas.

Published

CSS Wave Animation — preview
07 / 30Pure CSS

CSS Wave Animation

Ocean waves with animated boat, gradient wave, liquid-level vial and expanding pulse rings using CSS clip-path and sinusoidal keyframe paths.

Published

CSS 3D Flip Card Animation — preview
08 / 30Pure CSS

CSS 3D Flip Card Animation

Four CSS 3D card flip animations: auto-flip Y-axis, hover-triggered flip, X-axis flip and diagonal flip using CSS perspective and rotateY/X keyframes.

Published

CSS Neon Sign Flicker Animation — preview
09 / 30Pure CSS

CSS Neon Sign Flicker Animation

Five neon sign animations: cursive pink glow, cyan monospace, OPEN sign box, script yellow hum and multi-word stagger flicker using box-shadow and opacity keyframes.

Published

CSS Skeleton Loading Animation — preview
10 / 30Pure CSS

CSS Skeleton Loading Animation

Shimmer skeleton loading placeholders for blog cards, profile layouts, list rows and dashboard stat cards using a scoped linear-gradient sweep keyframe.

Published

CSS Glitch Text Animation Effect — preview
11 / 30Pure CSS

CSS Glitch Text Animation Effect

Four CSS glitch text effects: RGB channel split, terminal ghost, slice glitch and noise word distortion — using clip-path and translate keyframes with no JS.

Published

CSS Orbit Animation Solar System — preview
12 / 30Pure CSS

CSS Orbit Animation Solar System

Animated solar system with Sun, Mercury, Venus, Earth, Mars, Jupiter and Saturn orbiting at variable speeds on a starfield background — pure CSS rotate keyframes.

Published

CSS Liquid Fill Animation Progress Bar — preview
13 / 30Pure CSS

CSS Liquid Fill Animation Progress Bar

Liquid-fill progress bars with wave-bubble effect and circular liquid-fill widgets using CSS clip-path, pseudo-element waves and scoped keyframes.

Published

CSS Stagger Animation List Items — preview
14 / 30Pure CSS

CSS Stagger Animation List Items

Three stagger animation patterns: slide-from-left list items, scale-and-fade cards and cascade drop timeline entries using nth-child animation-delay.

Published

CSS Fire Animation Pure CSS — preview
15 / 30Pure CSS

CSS Fire Animation Pure CSS

Pure CSS fire: flickering candle with wick and wax, campfire with log base and IGNITE flame text — radial gradient bodies animated with scale and blur keyframes.

Published

CSS Ripple Click Animation Effect — preview
16 / 30Pure CSS

CSS Ripple Click Animation Effect

Material Design ripple animations on six button variants, FAB, chip groups and icon buttons using ::after pseudo-element scale + opacity keyframes.

Published

CSS Floating Elements Animation — preview
17 / 30Pure CSS

CSS Floating Elements Animation

Hero section with six floating stat cards and a floating icon grid using staggered translateY + rotate keyframe animations with unique durations per element.

Published

CSS Infinite Scroll Ticker Animation — preview
18 / 30Pure CSS

CSS Infinite Scroll Ticker Animation

Stock price ticker, brand logo marquee, bidirectional word scroll rows and breaking-news headline ticker using CSS translateX keyframes on duplicated content.

Published

CSS Countdown Timer Animation — preview
19 / 30Pure CSS

CSS Countdown Timer Animation

Arc ring countdown timers × 4, an animated flip clock and three linear progress countdown bars — all stroke-dashoffset or scaleX keyframes, pure CSS.

Published

CSS Path Drawing Animation — preview
20 / 30Pure CSS

CSS Path Drawing Animation

SVG stroke-drawing animations: signature handwriting, success checkmark, map route, logo outline, circuit trace and infinite symbol — stroke-dashoffset keyframes only.

Published

CSS Spotlight Animation Effect — preview
21 / 30Pure CSS

CSS Spotlight Animation Effect

Six spotlight effects: roving text highlight, stage light cones, security scan beam, product reveal orb, grid cell highlight and club sweep — radial-gradient keyframes.

Published

CSS Spring Bounce Animation — preview
22 / 30Pure CSS

CSS Spring Bounce Animation

Eight CSS spring and elastic animations: drop ball with squash, elastic button, pop-in notification, stagger scale cards, spin, wobbly text, spring menu and rubber bars.

Published

CSS Confetti Explosion Animation — preview
23 / 30Pure CSS

CSS Confetti Explosion Animation

Three confetti explosion styles: multi-directional radial burst, falling confetti rain and party-popper cracker — all pure CSS translate + rotate keyframes.

Published

CSS Breathing Animation Meditation — preview
24 / 30Pure CSS

CSS Breathing Animation Meditation

Six calming CSS breathing animations: classic expanding circle, box-breathing dot tracer, ripple rings, lotus bloom petals, SVG wave breath and stroke-dashoffset timer ring.

Published

CSS Typewriter Delete Animation Loop — preview
25 / 30Pure CSS

CSS Typewriter Delete Animation Loop

Six typewriter-and-delete loop patterns: word cycler, terminal prompt, search input placeholder, big display, multiline build-and-erase and code editor typing.

Published

CSS Aurora Borealis Animation Background — preview
26 / 30Pure CSS

CSS Aurora Borealis Animation Background

Animated northern-lights sky with skewed gradient curtain bands, tree silhouette and four colour-variant cards — green, purple/pink, blue-teal and multicolour aurora.

Published

CSS Card Stack Animation — preview
27 / 30Pure CSS

CSS Card Stack Animation

Five card stack animations: flip-through financial deck, fanned playing cards, depth-rise pricing stack, Tinder-style swipe deck and floating credit card stack.

Published

CSS Kinetic Typography Animation — preview
28 / 30Pure CSS

CSS Kinetic Typography Animation

Five kinetic type scenes: stagger letter spring-drop, explode-and-reassemble, sinusoidal wave, scale-pulse mixed-weight headline and RGB-split glitch — pure CSS keyframes.

Published

CSS Morphing Progress Steps Animation — preview
29 / 30Pure CSS

CSS Morphing Progress Steps Animation

Four animated progress step UI patterns: horizontal step track, radial ring steps, morphing pill steps and animated vertical timeline — all scoped CSS keyframes.

Published

CSS Animated Gradient Mesh Background — preview
30 / 30Pure CSS

CSS Animated Gradient Mesh Background

Animated gradient mesh using floating radial-gradient orbs on a dark base: full hero scene, four colour-variant cards (purple, pink, green, gold) and a rainbow gradient text strip.

Published

FAQ

Frequently asked questions

What is a CSS @keyframes animation and how does it differ from a transition?
A CSS @keyframes animation defines a multi-step animation sequence — you specify intermediate states (0%, 25%, 50%, etc.) and the browser interpolates between them. A transition animates ONLY between two states (a property value before and after a state change like :hover or a JS class toggle). Decision tree: (1) State change like hover/click → use transition — simpler, less code. (2) Looping motion (spinner, pulse, breathing, infinite ticker, glitch, aurora) → use animation + @keyframestransition can't loop. (3) Multi-stage choreography (icon morphs through 4 shapes, confetti bursts in 5 phases) → use animation — only @keyframes can express more than two states. (4) Scroll-driven motion → use animation-timeline: scroll() (Chrome 115+, Safari 18+) or a JS IntersectionObserver. All 30 demos in this collection use @keyframes because every pattern needs multi-step or infinite-loop motion that transition alone can't express.
Can I build a typewriter text effect in pure CSS without typed.js?
Yes — Demo 02 (CSS Typing Typewriter Text Effect) and Demo 25 (Typewriter Delete Loop) ship two variants, both 100% pure CSS. The core trick: two coordinated animations. (1) Set width: 0 on a .typewriter element with white-space: nowrap; overflow: hidden, then animate width: 0 → 100% via @keyframes type using the steps(N, end) timing function where N = character count. (2) A flashing cursor via a ::after pseudo-element with animation: blink 0.7s step-end infinite alternating opacity: 1 / 0. Cost comparison: typed.js ships ~10kb minified + requires JavaScript setup per element. This demo's approach: ~15 lines of CSS, ~0 bytes of JS, no library, no setup code, works in every framework or no framework. Demo 25 adds a delete-and-retype loop using animation-direction: alternate + a coordinated animation-delay on the cursor — still pure CSS, still ~25 lines.
How do I do particle bursts and confetti without HTML canvas?
Demos 06 (Particle Burst Animation) and 23 (Confetti Explosion Animation) ship the canvas-free pattern. The mechanic: pre-create N small <div> elements at the origin point, each with a unique @keyframes animation that defines a unique flight path (random x/y end positions via per-element CSS custom properties + transform: translate()). The animation-fill-mode: forwards property keeps each particle at its end position after the animation completes; opacity fades to 0 in the last 30% of the keyframes so the particles disappear after their burst. Cost comparison: canvas-confetti ships ~9kb minified + requires a <canvas> element + requestAnimationFrame draw loop + canvas context setup. This demo's approach: ~60 lines of CSS, 0 JS, 0 canvas, works on every browser since 2017. Trade-off: canvas-confetti supports 1000+ particles smoothly; this CSS pattern caps out around 50-80 particles before paint cost compounds. For typical celebration moments (form submission success, milestone reached, level-up confetti) 30-50 particles is more than enough and the visual impact matches the canvas version.
How do I build a skeleton loading shimmer animation (Facebook / LinkedIn style)?
Demo 10 (CSS Skeleton Loading Animation) ships the production-grade shimmer-bar pattern. The implementation: skeleton elements are gray placeholders matching the eventual content's shape (avatar circle, two text bars, image rectangle). Each has background: linear-gradient(90deg, #e0e0e0 0%, #f5f5f5 50%, #e0e0e0 100%) with background-size: 200% 100%, running animation: shimmer 1.5s infinite that translates background-position from 200% 0 to -200% 0. The shimmer band sweeps left-to-right across the placeholder, signaling "loading". Cost comparison: react-loading-skeleton ships ~8kb + requires React + JSX setup. This demo's approach: ~20 lines of CSS, framework-neutral, works in any stack. Three production-grade details most tutorials miss: (1) Match the skeleton's exact dimensions to the real content — otherwise visitors see layout shift (LCP penalty) when content replaces skeleton. (2) Add prefers-reduced-motion fallback — replace the shimmer animation with a static gray for visitors with motion sensitivity. (3) Show skeleton only after 200ms — if content loads faster, skip skeleton entirely (no flash-of-loading-state). Demo 10 includes all three.
How do I create an infinite-scroll ticker (HTML <marquee> replacement)?
Demo 18 (CSS Infinite Scroll Ticker Animation) ships the modern <marquee> replacement. HTML <marquee> has been deprecated since HTML5; modern browsers still render it but it's flagged as non-standard and may stop working in future versions. The CSS pattern: duplicate the ticker content inside a parent container with overflow: hidden, then animate the inner wrapper with animation: scroll 30s linear infinite that translates transform: translateX(0) → translateX(-50%). Because the content is duplicated, when the first copy scrolls off-screen the second copy is already in view, creating a seamless infinite loop. Why the 50% endpoint (not 100%): the inner wrapper's width is 200% of the visible viewport because of the duplication; translating to -50% moves exactly one copy's-worth, then the loop restarts cleanly. Three production-grade details: (1) Pause on hover via animation-play-state: paused — accessibility-friendly so visitors can read the ticker. (2) Respect prefers-reduced-motion — stop the scroll entirely, let visitors see all content statically. (3) Direction reversal via animation-direction: reverse for right-to-left RTL layouts. ~25 lines of CSS, zero JS, replaces deprecated <marquee>.
Will animating @keyframes hurt my Core Web Vitals INP score?
Not if you follow two rules — both of which all 30 demos in this collection follow. Rule 1: animate transform and opacity only. These two properties are GPU-accelerated and run on the compositor thread — they don't trigger layout recalculation or paint of other elements. Animating width, height, top, left, margin, padding, border-width, or font-size forces "layout thrashing" — every animation frame the browser recalculates every element's position, costing 4-16ms per frame and tanking INP (Interaction to Next Paint), the Core Web Vital that replaced FID in March 2024. Rule 2: animate box-shadow, filter, or border-radius only when you have to. These animate properties that require expensive paint recalculation each frame (2-8ms per frame). Demos that need shadow-or-blur transitions (Demo 04 pulse-glow button, Demo 09 neon flicker) use the opacity-cross-fade workaround: pre-render the glowing state as a separate element with opacity: 0, then animate opacity 0 → 1. The browser composites the two states instead of recalculating the shadow — drops paint cost from 8ms to under 1ms. Result: every demo in this collection runs at 60fps on a mid-tier 2022 Android phone (Pixel 5 / Galaxy A52 baseline). Lighthouse mobile-profile scores: 95+ Performance on all 30 demos.
How do I create an animated gradient mesh background without Three.js or WebGL?
Demo 30 (CSS Animated Gradient Mesh Background) ships the pure-CSS approach to the gradient-mesh visual that Stripe, Cal.com, and Linear marketing pages popularized. The trick: three or four large radial-gradient circles stacked via background-image with semi-transparent colors, then animate the background-position of each via @keyframes with different durations (20s, 28s, 35s) so the gradient "orbs" drift independently. The result is an organic, slowly-shifting color field that looks expensive to render but is actually pure CSS. Cost comparison: Three.js gradient-mesh shader ships ~600kb + requires WebGL context + custom shader code. Mesh-gradient libraries like meshgradient.js ship ~30-80kb + canvas setup. This demo's approach: ~30 lines of CSS, 0 JS, 0 canvas, 0 WebGL, works on every browser since 2018 (radial-gradient support). Performance is genuinely cheap — background-position animation is GPU-accelerated, runs on the compositor thread. Trade-off: pure CSS can't do the smooth Voronoi-cell color blending that real shader-based mesh gradients produce; it's an approximation that reads as "gradient mesh" to the visitor's brain without being mathematically identical.
What's the right animation-timing-function to use? When should I use steps()?
Five canonical timing functions, each with a clear use case. (1) linear — constant speed. Use for: rotation (loading spinners), infinite scroll tickers, conveyor-belt patterns. Anything that should feel mechanical and constant. (2) ease (default) — slow start, fast middle, slow end. Generic motion for content reveals. Safe default but rarely the BEST choice for any specific animation. (3) ease-out (cubic-bezier(0, 0, 0.2, 1)) — fast start, decelerating end. Use for: elements ENTERING the viewport (modal opens, toast appears, list item reveals). Mimics natural deceleration; the visitor's eye lands gently on the final position. (4) ease-in (cubic-bezier(0.4, 0, 1, 1)) — slow start, accelerating. Use for: elements LEAVING the viewport (modal closes, page transition out, toast dismisses). Mimics gravity pulling something out of frame. (5) cubic-bezier(0.34, 1.56, 0.64, 1) — overshoot + settle (spring bounce, Demo 22). Use for: playful button presses, success states, achievement unlocks. The 1.56 Y-value creates the overshoot. steps(N, end) — snaps between N discrete frames instead of interpolating smoothly. Use for: typewriter cursors (Demo 02, 25), sprite-sheet animations, retro 8-bit motion. Most online tutorials default to ease for everything; the demos in this collection use the right timing function for each pattern, and the file headers document the choice.
Are CSS keyframe animations accessible? What about prefers-reduced-motion?
Three accessibility considerations matter for keyframe animations, and all 30 demos in this collection handle them. Consideration 1: prefers-reduced-motion — WCAG 2.3.3 "Animation from Interactions". Visitors with vestibular disorders (motion sickness, inner ear conditions, migraine triggers) can experience nausea from continuous animations (spinners, pulse, breathing, aurora, ticker). Every demo includes an @media (prefers-reduced-motion: reduce) block that either disables the animation entirely OR replaces it with a static styling that still communicates the underlying signal — e.g. Demo 01's loading spinner becomes a static circular border + the text "Loading..."; Demo 18's ticker becomes a static list; Demo 24's breathing animation freezes mid-cycle. Consideration 2: focus indicators. Animated elements that are also focusable (buttons in Demo 04, interactive cards in Demo 08) include a :focus-visible ring that's NOT affected by the animation — keyboard users see clear focus regardless of the animation state. Consideration 3: aria-busy and aria-live. Loading-state demos (01 spinner, 10 skeleton) include semantic markup so screen readers announce "Loading" rather than reading visual decoration. The 30 demos in this collection are MIT-licensed; copy them with the accessibility patterns intact — don't strip the @media (prefers-reduced-motion) blocks when you paste.
Which CSS keyframe animation should I use for my project?
Quick decision guide for all 30 demos. Loading states: Demo 01 (Loading Spinners — 6 variants), Demo 10 (Skeleton Shimmer) for content placeholders, Demo 13 (Liquid Fill Progress) for determinate progress. Text effects: Demo 02 (Typewriter) for hero intros, Demo 25 (Typewriter Delete Loop) for rotating taglines, Demo 11 (Glitch Text) for cyberpunk brand, Demo 28 (Kinetic Typography) for editorial. Buttons: Demo 04 (Pulse Glow) for primary CTAs, Demo 16 (Ripple Click) for Material feedback, Demo 22 (Spring Bounce) for playful success states. Cards: Demo 08 (3D Flip Card) for service/pricing flip, Demo 27 (Card Stack) for testimonial stack reveal. Backgrounds: Demo 05 (Morphing Blob) for hero ambient, Demo 26 (Aurora Borealis) for premium dark mode, Demo 30 (Gradient Mesh) for Stripe-style marketing, Demo 21 (Spotlight) for focus-on-content effect. Interactive feedback: Demo 06 (Particle Burst) for celebration moments, Demo 23 (Confetti) for completion / signup success. Decoration: Demo 03 (Bouncing Ball), Demo 07 (Wave), Demo 15 (Fire), Demo 17 (Floating Elements), Demo 12 (Solar System Orbit) for whimsical landing pages. UI states: Demo 14 (Stagger List) for menu reveals, Demo 29 (Morphing Progress Steps) for checkout flow, Demo 19 (Countdown Timer) for product launches, Demo 20 (Path Drawing) for logo reveal. Niche: Demo 09 (Neon Flicker) for arcade brand, Demo 18 (Infinite Ticker) for marquee/news strip, Demo 24 (Breathing) for meditation apps. All 30 are 100% pure CSS, GPU-accelerated, respect prefers-reduced-motion, MIT-licensed.

Related collections

20 CSS Animated Buttons preview

20 CSS Animated Buttons

20 hand-coded CSS animated buttons — neon glow, ripple, 3D press, liquid fill, jelly bounce, shine sweep, animated border, moving gradient CTA, text flip, submit success state, add-to-cart progress, download icon, hamburger-to-close, toggle switch, loading spinner inside button, next/prev arrow nav, and ghost button background reveal. Half pure CSS, half lightweight JS for production interactions.

11 CSS animation-timeline Demos preview

11 CSS animation-timeline Demos

11 pure CSS animation-timeline demos built on the W3C scroll() and view() spec — reading progress bar, view-timeline fade & reveal, shrinking sticky header, stacking cards, horizontal scroll section, parallax hero, container shadow indicators, reverse-scroll columns, text scrim reveal, cover card to sticky header, and image zoom / clip-path wipe. Zero JS, off the main thread, Core Web Vitals safe. Copy-paste ready.

25 CSS Background Animations preview

25 CSS Background Animations

25 hand-coded CSS background animations for SaaS hero sections, developer tool documentation, agency portfolios, gaming and Web3 landing pages, seasonal e-commerce campaigns, and dark-mode dashboards. Covers full-screen gradient shifts, animated mesh gradients, aurora borealis glow, cursor spotlight follow, interactive water ripples, dot grid and diagonal stripe patterns, SVG grain and noise texture overlays, topographic contour lines, layered SVG waves, plasma and lava lamp fluids, bokeh light blur, particle constellation networks, matrix digital rain, synthwave 3D perspective grids, starfield warp speed, CRT scanline overlays, fog and mist drift, morphing organic blobs, floating glassmorphism orbs, halftone dot patterns, starry night skies, floating geometric shapes, rising bubbles, and falling snow. 20 are pure CSS with zero JavaScript; the 5 that need it use vanilla canvas or pointer tracking with no dependencies. Every background animates compositor-only properties so it never blocks the main thread, is scoped under a .bga-NN prefix for no-collision pasting, guards prefers-reduced-motion, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.

Search CodeFronts

Loading…