BlogPublished on

CSS button effects: 14 animations to try and copy

Tired of a simple colour change on hover? CSS can do so much more! Launch rockets, pop up hearts and fan out colourful shadows. Explore 14 creative button effects in pink, mint and lilac, with live previews and complete HTML and CSS snippets to try and copy.

Pastel three-dimensional buttons with a mouse pointer and motion accents in pink and mint

Diesen Beitrag auf Deutsch lesen

Try the effects before copying the code

Move your pointer over a button to play its effect: 3D layers, floating hearts, neon light, a flipping face or a new message. Click the button to open its explanation and complete code. On touchscreens, press a button to try it and open its details.

“Copy effect” copies a complete HTML and CSS example, including the source comment anitamostofa.com. Open “How it works & code” to read or manually select the snippet. The previews use the exact same CSS as the copied examples.

01

Fanning colour shadows

LIGHT / SHADOW
Hover to play · Click for details
02

Circle rolls to the right

ROTATE / ARROW
Hover to play · Click for details
03

Rolling text, new message

TEXT / REVEAL
Hover to play · Click for details
04

Pressable candy key

GLOSS / LIGHT
Hover to play · Click for details
05

Liquid fill

LIQUID / FILL
Hover to play · Click for details
06

Arcade key

ARCADE / PRESS
Hover to play · Click for details
07

Heart confetti

HEARTS / POP
Hover to play · Click for details
08

Neon tube with light fill

NEON / GLOW
Hover to play · Click for details
09

3D flip with text swap

3D / FLIP
Hover to play · Click for details
10

Open the curtain

SPLIT / REVEAL
Hover to play · Click for details
11

An opening envelope

PAPER / OPEN
Hover to play · Click for details
12

Laser scan

LASER / SCAN
Hover to play · Click for details
13

Rocket launch with colour smoke

ROCKET / SMOKE
Hover to play · Click for details
14

Orbit ring

ORBIT / DRAW
Hover to play · Click for details

Add a CSS button animation in three steps

  1. Copy an example. Place its button markup where the action belongs on your page.
  2. Move the rules inside the style tag into your stylesheet. When copying several effects, include the shared .am-fx base and reduced-motion rules only once.
  3. Adapt the label and colours, then connect your real action. Use a button for actions and an anchor with an href for navigation. Test keyboard, touch and both colour modes.

Match the movement to your visual identity

Rounded shapes, pink and mint make these examples feel playful. A restrained brand might choose the moving arrow alone. Pick one consistent motion style for your primary buttons instead of assigning every button a different trick. Keep labels concrete: “View project” says more than “Click here”.

The snippets define their own accent and text colours so they work outside this website. Replace those values with your brand tokens. A CSS demo is a starting point: your typography, spacing and surrounding layout determine how the final button feels.

Keep buttons usable with and without motion

The examples animate transforms rather than layout dimensions. Each demo uses a stable hover area, including in embedded browsers that report no hover capability. A separate focus outline makes keyboard navigation visible, while the duplicate rolling label is hidden from screen readers. Reduced-motion settings disable the movement. Check the final colours and behaviour in your own site before using a snippet in production.

More ideas for your website: CSS animations in web design (German) and creative letter styles (German).

Button interactions that fit your brand

I design websites with clear user journeys and thoughtful interactions that reflect your visual identity. Let’s turn your idea into a coherent website.

Get in touch
Anita Mostofa working on a laptop, graphic and web designer in Dresden

CSS button effects: frequently asked questions

No. All 14 effects use HTML and CSS. JavaScript on this page handles copying and expanding the explanations. The hover animations themselves need no JavaScript.

Copy the HTML and CSS, add the button to your page and move the CSS rules into your stylesheet. In WordPress, a Custom HTML block and your theme’s additional CSS can work, provided your editor allows that markup and styling.

Touchscreens have no reliable hover state. The examples also use :active for touch feedback. The button should remain recognisable and usable without any animation.

Change --pink, --mint and --ink in the copied CSS. For the rising fill, change the mint layer too. Check text contrast in both the default and active states.

The snippets respect prefers-reduced-motion and turn off movement and transitions when that preference is enabled. The visible keyboard focus remains available.