Synthwave & Starfield

Retro synthwave scene with animated 3D grid walls, hue-cycling neon lines, and a hyperspace starfield β€” pure CSS, no JavaScript.

Synthwave & Starfield

A dark synthwave tunnel built entirely in CSS. Four 3D grid planes (left wall, right wall, floor, ceiling) are constructed using rotateX/rotateY transforms on pseudo-elements and animated with repeating-linear-gradient backgrounds. The hue continuously cycles via a hue-rotate filter. Two overlapping repeating-conic-gradient layers form the starfield, animating along the Z axis to simulate hyperspace travel. The entire scene runs by default; add .art-synthwave-starfield-paused to freeze it.

Basic Usage

Synthwave & Starfield

Paused

Add .art-synthwave-starfield-paused to freeze all animations:

Paused

Sizes

Small

Large

CSS Custom Properties

PropertyDefaultDescription
--art-synthwave-starfield-size600pxWidth and height of the square canvas; all proportions scale from this
--art-synthwave-starfield-line-color#6bd600Neon green grid line color (hue-rotated over time)

HTML Structure

<div class="art-synthwave-starfield">
  <!-- Floor + ceiling planes -->
  <div class="art-synthwave-starfield-sides art-synthwave-starfield-topbot"></div>
  <!-- Left + right wall planes -->
  <div class="art-synthwave-starfield-sides art-synthwave-starfield-lefrig"></div>
  <!-- Starfield layer 1 -->
  <div class="art-synthwave-starfield-stars"></div>
  <!-- Starfield layer 2 (offset delays for seamless looping) -->
  <div class="art-synthwave-starfield-stars"></div>
</div>

The two art-synthwave-starfield-sides divs share the same base styles. art-synthwave-starfield-topbot adds floor/ceiling planes via rotateX(Β±90deg), while art-synthwave-starfield-lefrig adds left/right walls via rotateY(Β±90deg).

The two art-synthwave-starfield-stars divs each have two pseudo-elements, giving four total star layers with staggered -1s / -2s / -3s / -4s delays β€” ensuring there’s always a visible star layer during the animation cycle.

API Reference

ClassDescription
art-synthwave-starfieldRoot element β€” sets the dark background, perspective, and gradient overlays
art-synthwave-starfield-topbotAdds floor and ceiling grid planes
art-synthwave-starfield-lefrigAdds left and right wall grid planes
art-synthwave-starfield-sidesRequired base class for both grid panels
art-synthwave-starfield-starsOne starfield layer (use two for seamless looping)
art-synthwave-starfield-pausedModifier on root β€” pauses all animations
art-synthwave-starfield-smSmall size (--art-synthwave-starfield-size: 300px)
art-synthwave-starfield-lgLarge size (--art-synthwave-starfield-size: 900px)