AI CSS Animations

CSS Text Animations

31 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

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.