Glitch

Glitch & Distortion · Animated · pure CSS

The classic RGB-split glitch: cyan/magenta pseudo-element copies tear and shift on clip-path keyframes. Cyberpunk in a single class (needs a data-text attribute).

Glitch

How it works

Glitch is an animated glitch & distortion text effect rendered entirely in CSS. A data-text attribute mirrors the word into ::before/::after layers, so copy that attribute together with the CSS.

Controls

Glitch exposes 1 dedicated control — Shift — on top of the shared type controls (font, weight, letter-spacing and case). Open it in the generator to tune every value live, then copy the updated CSS.

CSS

/* Glitch — made with TEXT-FX · https://text-fx.app
 * HTML: the element needs a data-text attribute equal to its text.
 * Font: 'Major Mono Display', monospace (load from Google Fonts).
 */

.text-effect {
  font-family: 'Major Mono Display', monospace;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: none;
}

.text-effect {
  position: relative;
  color: #f2f2f2;
}
.text-effect::before,
.text-effect::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}
.text-effect::before {
  color: #00eaff;
  transform: translate(-4px, 0);
  mix-blend-mode: screen;
  animation: text-effect-g1 2.4s infinite linear alternate-reverse;
}
.text-effect::after {
  color: #ff003c;
  transform: translate(4px, 0);
  mix-blend-mode: screen;
  animation: text-effect-g2 3.1s infinite linear alternate-reverse;
}

@keyframes text-effect-g1 {
  0% { clip-path: inset(0 0 82% 0); }
  25% { clip-path: inset(40% 0 30% 0); }
  50% { clip-path: inset(70% 0 10% 0); }
  75% { clip-path: inset(15% 0 55% 0); }
  100% { clip-path: inset(85% 0 2% 0); }
}
@keyframes text-effect-g2 {
  0% { clip-path: inset(60% 0 20% 0); }
  25% { clip-path: inset(10% 0 70% 0); }
  50% { clip-path: inset(35% 0 40% 0); }
  75% { clip-path: inset(80% 0 5% 0); }
  100% { clip-path: inset(20% 0 60% 0); }
}

HTML

This effect needs the markup below (per-letter spans, SVG defs, or a data-text attribute).

<!-- Made with TEXT-FX · https://text-fx.app -->

<style>
.text-effect {
  font-family: 'Major Mono Display', monospace;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: none;
}

.text-effect {
  position: relative;
  color: #f2f2f2;
}
.text-effect::before,
.text-effect::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}
.text-effect::before {
  color: #00eaff;
  transform: translate(-4px, 0);
  mix-blend-mode: screen;
  animation: text-effect-g1 2.4s infinite linear alternate-reverse;
}
.text-effect::after {
  color: #ff003c;
  transform: translate(4px, 0);
  mix-blend-mode: screen;
  animation: text-effect-g2 3.1s infinite linear alternate-reverse;
}

@keyframes text-effect-g1 {
  0% { clip-path: inset(0 0 82% 0); }
  25% { clip-path: inset(40% 0 30% 0); }
  50% { clip-path: inset(70% 0 10% 0); }
  75% { clip-path: inset(15% 0 55% 0); }
  100% { clip-path: inset(85% 0 2% 0); }
}
@keyframes text-effect-g2 {
  0% { clip-path: inset(60% 0 20% 0); }
  25% { clip-path: inset(10% 0 70% 0); }
  50% { clip-path: inset(35% 0 40% 0); }
  75% { clip-path: inset(80% 0 5% 0); }
  100% { clip-path: inset(20% 0 60% 0); }
}
</style>

<div data-text="Your text" class="text-effect">Your text</div>
Category
Glitch & Distortion
Type
Animated
Browser support
pseudo-element copies + clip-path animation
Capabilities
dataText

Related Glitch & Distortion effects