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:
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:
For a full CRT monitor overlay with curvature, vignette, and power-off line, inspect CRT Screen:
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);
}
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:
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: noneon the scanline::afteroverlay — otherwise users cannot highlight text or click links inside the terminal. - Keep body text above 13 px. Heavy
text-shadowbloom blurs small characters quickly, especially on non-Retina displays. - Avoid animating full-screen scanline movement with
background-positionon 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.