AI CSS Animations

CSS Text Animations

301 copy-paste text effects: typewriters, glitches, gradients, reveals and loops. Each one is a single HTML + CSS snippet with no JavaScript, recolored and resized with two variables.

Scrolling Marquee

Text scrolls endlessly from right to left with no seam. The trick is two copies of the content moving together by exactly one copy's width, so the loop point is invisible.

loop · scroll

Scrolling Terminal Log Text

A live server log that never stops: each new request types in on the bottom row, then the feed scrolls up a line. The first rows repeat at the end, so the 4.5s loop has no seam.

typing · retro · loop

Matrix Rain Text Effect

Columns of falling glyphs rain down behind a word, each at its own speed, fading toward the top like a trail. Every column is vertical text moved with transform, desynced by negative delays.

glow · cinematic · loop

Odometer Number Animation

Digits roll up into place like a car odometer, each column on its own strip, with the right-hand columns spinning through extra turns. One keyframe, driven by a --to value per column.

numbers · one-shot

News Ticker with Live Badge

A breaking news bar: a pulsing LIVE badge pinned on the left while headlines scroll past behind it. The headline track is the two-copy marquee, faded where it slides under the badge.

loop · words

Stock Ticker Animation

A market ticker tape: symbols, prices and green or red changes with arrows glide past on a thin band. The tape is a two-copy marquee, so it can hold any number of quotes without a seam.

numbers · loop

Crossed Two Row Marquee

Two tilted ribbons cross in an X and scroll in opposite directions, the loud look of agency and streetwear sites. Same keyframe for both rows; the second simply runs it in reverse.

loop · words · playful

Star Wars Text Crawl

Story text scrolls up a tilted plane and shrinks toward a vanishing point, like a space opera's opening crawl. A rotateX plane inside a perspective box, faded out at the far end with a mask.

3d · cinematic · loop

Film Credits Roll

Two columns of roles and names roll upward through a faded window, like the end credits of a film. The list is duplicated and moved by exactly half its height, so the loop has no seam.

cinematic · subtle · loop

How to use these text animations

Open any effect, copy the HTML into your markup and the CSS into your stylesheet. Nothing else is required. Classes are prefixed per effect so several can share a page.

To change the color, set --txt-color on the element or any ancestor. To change the size, set --txt-size: offsets, shadows and letter spacing are all in em, so they follow the font size.

One-shot effects such as the typewriter and the reveals play when the element appears. To trigger them later, add the class when you need it, or toggle animation-play-state.

Every snippet ships with a prefers-reduced-motion rule that jumps straight to the finished state for people who asked their OS for less motion, so the text is always readable.

Frequently asked questions

How do I make a typewriter effect in pure CSS?

Put the text in an element with white-space: nowrap and overflow: hidden, then animate its width from 0 to the text length in ch units using steps(). A blinking border-right plays the caret. The typewriter entry above is the complete snippet.

How do I animate gradient text in CSS?

Apply a gradient as the background, clip it to the text with background-clip: text and a transparent color, then animate background-position with a background-size larger than the element. The gradient and rainbow entries show both a brand-colored and a full-spectrum version.

How do I animate text letter by letter?

Wrap each letter in a span and give each one an index in a custom property, such as style="--i: 3". The animation delay is then calc(var(--i) * 60ms), so one keyframe animates any word. The letters rise, letters pop and wave entries use this.

Can text animations run without JavaScript?

Every entry in this directory is CSS only, including the counting number, which uses a registered custom property and a CSS counter. JavaScript is only needed if you want to start an effect on scroll or on a click, in which case you add the class at that moment.

Are these text animations accessible?

The text stays real text, so screen readers and search engines read it normally. Each snippet includes a prefers-reduced-motion rule that skips to the finished state. Use blinking and glitch effects sparingly, and never for body copy.