CSS Effects Gallery

Each effect running live, grouped the way they're usually talked about. Under each one is its usual name and the CSS that does the work.

Loading placeholders

Shown while content is on its way. The doc's flickering text is the first one.

What else was checked and found nothing

Shimmer text

A gradient clipped to the letters, slid sideways forever.

background-clip: text; animation on background-position

Skeleton screen

Grey shapes standing in for the content, with a shimmer passing over.

linear-gradient + background-position keyframes

Pulse

The placeholder fades in and out instead of sweeping.

@keyframes { 50% { opacity: .35 } }

Spinner

A ring with one coloured edge, rotating.

border-top-color + transform: rotate(360deg)

Typing indicator

Three dots on the same animation, each starting a little later.

animation-delay: .15s / .3s
determinate
indeterminate

Progress bar

One fills to show how far along; the other just shows work is happening.

animate width / left

Text effects

Ways of drawing attention to words themselves.

Hello, I'm typing this.

Typewriter

The box widens one character at a time over monospaced text.

width: 0 β†’ 22ch; steps(22)
Waiting for input

Blinking cursor

A bar character that switches on and off with no fade.

::after { content: "|" }; step-end
Gradient

Gradient text

The shimmer's technique without the movement.

background-clip: text; color: transparent
OPEN

Glow / neon

Several stacked text shadows in widening blur, breathing slowly.

text-shadow: 0 0 4px, 0 0 12px, 0 0 26px …
SIGNAL

Glitch

Two coloured copies of the text, each cropped and jolted sideways for a moment.

::before/::after + clip-path + translate
FTSE 100 +0.4%GBP/USD 1.27Brent $81.20Gold $2,410 FTSE 100 +0.4%GBP/USD 1.27Brent $81.20Gold $2,410

Marquee / ticker

Content written twice, slid left by half its width, so the loop is seamless. Figures are examples.

transform: translateX(-50%)
DECODED

Scramble / decode JavaScript

Random characters settle left to right into the real word. CSS can't pick random letters, so a script does it.

setInterval + Math.random()

General motion

Movement on whole elements. Some of these only fire when you interact.

Fade-in / slide-in

Items rise into place one after another. On real sites it is usually triggered by scrolling.

opacity 0β†’1 + translateY; staggered delays

Bounce

Up and down on an easing curve, squashing slightly at the bottom.

alternate + cubic-bezier + scale

Wiggle

A quick rotation back and forth that dies away, then a rest.

rotate(14deg β†’ -12 β†’ 9 β†’ …)

Shake on submit

Type anything and press Enter. Every answer is wrong, so the field shakes.

translateX(-8px ↔ 8px) for 0.4s

Ripple on click

A circle grows from the exact point you clicked and fades out.

span at click point; scale(0 β†’ 4)
Hover meor tab to me

Hover lift on hover

A transition, not an animation: it runs only when the state changes.

transition: transform, box-shadow

More effects

Other common effects the first three sections leave out. Tags mark the ones that need JavaScript or wait for you to do something.

Loading and progress

Blur-up image

A tiny blurred copy shows first, then the picture sharpens when the full image arrives. Here it loops.

filter: blur(12px) β†’ blur(0)
Loading...

Dot ellipsis

The dots after the word appear one at a time, then start again.

opacity steps at 25% / 50% / 75%

Circular progress

A ring that fills round like a clock hand, instead of spinning.

stroke-dasharray + stroke-dashoffset

Text

Words rise upfrom behind a line.

Text reveal

Each line slides up from behind an invisible edge, a little after the one above.

overflow: hidden + translateY(100% β†’ 0)

Letter stagger

Every letter runs the same animation, each starting slightly later.

animation-delay: calc(var(--i) * 60ms)
We build appssitestoolsapps

Rotating words

A stack of words slides up behind a window one word tall. The last word repeats the first so the loop is seamless.

translateY(0 β†’ -100% β†’ -200% …)
0sign-ups (example figure)

Counting number JavaScript

The figure counts up when it scrolls into view, slowing as it lands.

requestAnimationFrame + ease-out

Some words get a highlighter stroke, others an underline drawn beneath.

Highlighter / underline draw

A coloured band grows behind the words, and a line draws itself under others.

background-size: 0% β†’ 100%
HOLLOW

Outline text on hover

Letters drawn as an outline only. Point at them and colour floods in from the left.

-webkit-text-stroke + background-clip: text

Motion and transitions

Scroll inside this box ↓

The hills move more slowly than this text…

…so they seem further away.

Parallax JavaScript scroll it

Scroll inside the box. The far hills move least, the near hills more, the text most.

translateY(βˆ’scrollTop Γ— speed)

As you scroll this box, the bar along its top fills to show how far through you are.

On a long article the bar usually sits along the very top of the window.

This one uses a few lines of JavaScript that read the scroll position.

Newer browsers can do the same in CSS alone, with animation-timeline: scroll().

You have reached the end, so the bar is full.

Scroll-linked progress JavaScript scroll it

Scroll inside the box and the bar along its top tracks your position.

width = scrollTop Γ· (scrollHeight βˆ’ clientHeight)

A

Aberdeen

Arundel

Ayr

B

Bangor

Bath

Bristol

C

Cardiff

Chester

Cork

D

Derby

Dover

Dundee

Sticky / pinned scroll it

Each letter heading pins to the top until the next one pushes it off.

position: sticky; top: 0
Inbox3 new messages
Messageopened view

View transition on click

One view slides away as the next slides in. Browsers also have a View Transitions API for whole pages.

transform + opacity transitions
Fronthover or tab to me
Back

Flip card on hover

The card turns over in 3D. Each face is hidden while it faces away.

rotateY(180deg); backface-visibility: hidden

The panel grows from nothing to its natural height, and the arrow turns over.

Accordion on click

Click the question to open and close the panel.

grid-template-rows: 0fr β†’ 1fr

Toast on click

A notice slides in from the corner, waits, then slides away.

translateY + opacity; a timer hides it

Magnetic button JavaScript

Bring the pointer near and the button leans towards it.

mousemove β†’ translate(dx Γ— 0.35, dy Γ— 0.35)
Tilt memove the pointer over me

Tilt / 3D hover JavaScript

The card tilts in perspective to follow the pointer.

perspective + rotateX / rotateY

Morph on click

Three bars become an X: the outer two rotate into place and the middle one fades.

rotate(Β±45deg) + opacity

Confetti JavaScript

Pieces burst out from the button, then fall and fade.

random --dx, --dy, --r per piece
Aurora

Animated gradient / aurora

Large blurred blobs of colour drifting slowly behind the content.

filter: blur(38px) + slow translate
Frosted panel

Glassmorphism

A see-through panel that blurs whatever moves behind it. A look more than a motion.

backdrop-filter: blur(12px)