GLITCH LAB v1.0 ezolab.dev / lab instrument SYS: READY ✦ Holiday cards

Lab/ Guides/ Build

Retro Terminal UI in Pure CSS: Scanlines, Glow & Typing

Build a retro CRT terminal interface in pure HTML and CSS: repeating-linear-gradient scanlines, phosphor text glow, blinking block cursor and vignette — with live demos.

/#animation/#terminal/#text

Guide // BuildLive demos inside
Contents [8]
  1. The quick answer
  2. Layer 1: CRT scanlines without blocking clicks
  3. Layer 2: Phosphor bloom (green P31 vs amber P3)
  4. Layer 3: Sharp blinking block cursor
  5. What fonts look like old computer terminals?
  6. Gotchas & browser support
  7. Accessibility
  8. FAQ

A convincing retro terminal UI is not just green monospace text on a black box. Real CRT terminals had three subtle physical traits: faint horizontal scanlines, glowing phosphor bloom around bright glyphs, and a crisp blinking block cursor.

You can recreate all three in pure HTML and CSS with zero images and zero JavaScript. Here is each layer broken down with live demos, plus which fonts actually look like vintage hardware.

The quick answer

Combine a dark phosphor background, a text-shadow glow, a repeating-linear-gradient scanline overlay (pointer-events: none), and a steps(1) blinking block cursor:

Complete retro CRT terminal panel — pure HTML & CSS, zero images

Layer 1: CRT scanlines without blocking clicks

Real CRT monitors drew every frame line by line, leaving tiny dark gaps between rows. In CSS, repeating-linear-gradient on a ::after pseudo-element creates crisp scanlines at any resolution:

.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgb(0 0 0 / 0.28) 2px 4px
  );
  pointer-events: none; /* lets users select text and click buttons underneath */
}

Keep the dark stripe opacity between 0.18 and 0.32. Darker stripes look cool for two seconds and then make paragraphs exhausting to read:

Left: subtle 25% scanlines (readable). Right: 65% scanlines (harsh)

For a full CRT monitor overlay with curvature, vignette, and power-off line, inspect CRT Screen:

[FX_07] Pure CSSCRT ScreenCSS CRT effect: neon phosphor text with scanlines, a rolling band, flicker and a power-off into a line and a dot. Pure CSS, no JS.Tweak it live & copy the code →

Layer 2: Phosphor bloom (green P31 vs amber P3)

Old terminals came in two iconic phosphor colors: green (P31) and amber (P3). What makes phosphor look lit instead of flat colored text is a two-step text-shadow: a tight halo (3–4 px) for the bright core, and a wider, fainter bloom (14–18 px) for light scattering inside the glass:

/* Green P31 phosphor */
.green {
  color: #5cff9d;
  text-shadow: 0 0 4px rgb(92 255 157 / 0.7), 0 0 16px rgb(57 255 136 / 0.25);
}

/* Amber P3 phosphor */
.amber {
  color: #ffb84d;
  text-shadow: 0 0 4px rgb(255 184 77 / 0.7), 0 0 16px rgb(255 140 0 / 0.28);
}
Classic P31 green phosphor vs P3 amber phosphor

Layer 3: Sharp blinking block cursor

A real terminal cursor does not fade in and out softly — it snaps on and off. Use steps(1) so the browser jumps straight between opacity: 1 and opacity: 0:

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: currentColor;
  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

Pair the terminal frame with live typing or character decrypting:

[FX_04] CSS + JSTypewriterCSS typewriter effect with @property: letters slide in one by one, the freshest glows hot, then the line erases and types again.Tweak it live & copy the code →
[FX_06] CSS + JSScramble TextText scramble effect in vanilla JS: the word turns into random glyphs and decodes back letter by letter, with a fading echo. No GSAP, any text.Tweak it live & copy the code →

What fonts look like old computer terminals?

Old hardware terminals (DEC VT100, IBM 3270, Apple II) used fixed-width bitmap fonts with tall proportions and slashed or dotted zeroes. On the modern web, pick a monospace font that stays sharp at 13–16 px:

Vibe Good web fonts
1980s mainframe / DOS VT323, IBM Plex Mono, Share Tech Mono
Modern cyber / dev terminal JetBrains Mono, Fira Code, Space Mono
Zero extra downloads ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace

Gotchas & browser support

  • Never forget pointer-events: none on the scanline ::after overlay — otherwise users cannot highlight text or click links inside the terminal.
  • Keep body text above 13 px. Heavy text-shadow bloom blurs small characters quickly, especially on non-Retina displays.
  • Avoid animating full-screen scanline movement with background-position on large viewports — static scanlines cost almost zero GPU time and look cleaner.

Accessibility

Turn off the blinking cursor and any CRT flicker when the user prefers reduced motion, leaving the cursor solid so the prompt still reads cleanly:

@media (prefers-reduced-motion: reduce) {
  .cur {
    animation: none;
    opacity: 1;
  }
}

FAQ

What font did old computer terminals use?

Classic terminals like the DEC VT100 and IBM 3270 used custom hardware bitmap fonts built into ROM, characterized by fixed-width characters and clear distinction between 0 and O. For modern websites, IBM Plex Mono, VT323, Share Tech Mono, or JetBrains Mono recreate that look cleanly.

How do I make CRT scanlines in CSS without an image?

Add a ::after pseudo-element with position: absolute; inset: 0; pointer-events: none; and background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / 0.25) 2px 4px);.

Do retro terminal effects work on mobile?

Yes. repeating-linear-gradient, text-shadow, and steps(1) cursor animations work in every mobile browser with minimal performance cost.