Most lists of CSS text effects give you a hundred pens and no idea which one to pick. This one is short on purpose: five text effects that behave like real light and real signals — a neon tube, a broken video channel, a terminal — each with the key idea in a few lines of code, a live preview, and a page where you can tweak every setting and copy the result. After them, four small tricks you can use on any heading today.
Which one to pick
| Effect | Feels like | Good for |
|---|---|---|
| Chromatic Wave | an RGB signal that slips | hero titles, logos |
| Neon Sign | a glass tube, a bit broken | bars, events, night themes |
| Glitch Text | a torn video frame | errors, 404, cyberpunk |
| Typewriter | a terminal typing | intros, dev portfolios |
| Scramble Text | a code being decrypted | menus, hover, reveals |
All five keep the text as real text: it can be selected, translated and read by screen readers. Four of them are pure CSS; Scramble Text needs about 50 lines of plain JavaScript.
1. RGB split — Chromatic Wave
Three copies of the word in pure red, green and blue lie on top of each other. With mix-blend-mode: screen their light adds up: where all three overlap you see white, and where they slip apart, coloured edges appear — real chromatic aberration, not a tinted shadow.
.wave { position: relative; color: #00ff00; }
.wave::before,
.wave::after {
content: attr(data-text);
position: absolute;
inset: 0;
mix-blend-mode: screen;
}
.wave::before { color: #ff0000; transform: translateX(-4px); }
.wave::after { color: #0000ff; transform: translateX(4px); }
The live version swings the copies like a damped wave and then rests:
Use it on a dark background: screen adds light, so on white it disappears (the effect page has a CMYK version for light themes). No JavaScript.
2. Flickering neon — Neon Sign
Each letter is a separate tube. A glow is a stack of text-shadows from tight to wide; the flicker is a keyframe animation with steps(1), because a real tube switches on and off — it does not fade. One "faulty" letter runs on a different cycle, so the sign never blinks in sync.
.neon i {
font-style: normal;
color: #fff8c2;
text-shadow: 0 0 4px #ffe600, 0 0 14px #ffe600,
0 0 34px #ffd000, 0 0 80px #ff9e00;
animation: tube 9s steps(1) infinite;
}
.neon i:nth-child(3) { animation-duration: 3.3s; }
@keyframes tube {
0%, 5%, 9% { color: rgb(255 230 0 / 0.14); text-shadow: none; }
3%, 8%, 18% { color: #fff8c2; }
}
Use it for one word, not a paragraph: big blurred shadows are not free to paint. The full version adds about 25 lines of JS only to pick a random letter and a random moment.
3. Torn glitch — Glitch Text
The word is stacked several times in one grid cell. Each copy shows only a thin horizontal strip (clip-path: inset()), and once in a while the strips jump sideways while red and blue channels swing apart — a frame of broken video. Then it rests.
.glitch { display: grid; }
.glitch span { grid-area: 1 / 1; }
/* one strip: only 5% of the height is visible */
.glitch span:nth-child(2) {
clip-path: inset(28% -90px 67% -90px);
animation: tear 4s ease-in-out 1.2s infinite;
}
@keyframes tear {
0%, 5.5%, 100% { transform: none; }
1.2%, 3.5% { transform: translateX(-36px); }
}
Use it sparingly: one sharp glitch every few seconds reads as "signal", constant shaking reads as "bug". The rest between glitches is a setting on the effect page (see how to pause between loops).
4. Typing terminal — Typewriter
The classic typewriter animates the width of the line with steps(). This one counts letters instead: a registered number --n goes 0 → 10, and each letter i appears when the count reaches it. That lets the newest letter glow "hot" and cool down, and it works for any word length.
@property --n {
syntax: "<number>";
inherits: true;
initial-value: 0;
}
.type { animation: type 4.5s linear infinite; }
.type i {
/* 0 before its turn, 1 after: --i is the letter's index */
--k: clamp(0, (var(--n) - var(--i)) * 1.5, 1);
display: inline-block;
width: calc(var(--k) * 1ch);
opacity: var(--k);
}
@keyframes type {
27%, 75% { --n: 10; }
}
Use it for a short line in a monospace font. A few lines of JS only split the text into letters, so you can type any word into it.
5. Decrypting text — Scramble Text
Letters turn into random glyphs and settle back into the real word from left to right. This needs randomness every frame, so it is JavaScript — but no library:
const glyphs = "!<>-_\\/[]{}=+*^?#";
function frame(word, progress) {
return [...word].map((ch, i) =>
i < progress * word.length
? ch
: glyphs[Math.floor(Math.random() * glyphs.length)]
).join("");
}
Use it on hover or when a section scrolls into view. Give each glyph a fixed width (1ch in a monospace font), otherwise the word jumps while it scrambles.
4 small tricks for any heading
Not every heading needs a whole effect. These are one rule each.
Soft glow
Two text-shadows: a tight one for the edge, a wide one for the halo. Keep the text colour lighter than the glow — that is what makes it look lit from inside.
Gradient text
Paint a gradient as the background and clip it to the letters. A chrome-like grey gradient reads as "retro metal" without adding new colours.
Outline text
-webkit-text-stroke draws the outline; a transparent fill leaves only the contour. It works in all current browsers despite the prefix.
Reveal with a pause
Animate clip-path: inset() from fully hidden to fully visible, then hold — the rest is part of the cycle, the same trick as in pausing between loops.
Performance and accessibility
- Animate
transform,opacityandclip-path. Animating bigtext-shadows orfilteron a lot of text costs paint time; keep it to a heading. - Keep the real text in the HTML. Some screen readers announce text from
::before/::after; give the copies empty alternative text —content: attr(data-text) / ""— so the word is read once. When you split a word into letters, putaria-labelwith the whole word on the parent. - Respect "reduce motion". Every effect above stops or becomes a still frame under
prefers-reduced-motion: reduce. - Rest between runs. A pause of a few seconds makes an effect feel deliberate and is easier on the eyes.
FAQ
What are CSS text effects?
Styles and animations applied to text with CSS alone: shadows and glows, gradients, outlines, and animations like glitch, neon flicker or typing. The text stays real text — selectable and readable by search engines and screen readers.
How do I add an effect to text in CSS?
For a static look, one property is often enough — text-shadow for glow, background-clip: text for gradients, -webkit-text-stroke for outlines. For motion, add @keyframes and animation, and copy the text into ::before/::after with content: attr(data-text) when you need layers.
What are some good CSS text animations?
For a dark, techy site: RGB split, flickering neon, glitch slices, a typing terminal and a decrypt/scramble effect — the five above. For calmer pages: a soft glow pulse or a clip-path reveal.
Can I copy and paste these effects?
Yes. Each effect page has a live configurator: change the text, colours, speed and pause, then copy the HTML and CSS (and JS where needed) or download a .zip. Free to use.