AI CSS Animations

CSS Space, Star & Particle Backgrounds

33 space and particle backgrounds in pure CSS: star fields, shooting stars, warp speed tunnels, galaxies, floating particles and particle networks.

How to use these space & particle backgrounds

Each background is one element that fills its container. Give your hero or section position: relative, put the background element inside it as the first child, and lift your content above it with position: relative; z-index: 1. For a full-page background, use position: fixed on the layer instead.

To change the accent color, set --bgx-color. To change the scale of the pattern (stars, grid cells, blobs, waves), set --bgx-size: everything inside is in em. Keep text contrast in mind on busy backgrounds.

Every snippet ships with a prefers-reduced-motion rule that freezes the background for people who asked their OS for less motion. The layers animate transform, opacity and background-position, which stay smooth on large areas.