Gradient Stacking
CSS allows multiple backgrounds on a single element. Layer
linear-gradient, radial-gradient, and
conic-gradient with precise stops to paint without pixels.
Every pixel is a style rule.
No canvas. No WebGL. No image files. Every form above is built from a single element — or a handful — styled with pure CSS. These are the techniques.
CSS allows multiple backgrounds on a single element. Layer
linear-gradient, radial-gradient, and
conic-gradient with precise stops to paint without pixels.
clip-path: polygon() carves any shape from a rectangle.
Triangles, diamonds, stars, mountains — all from a div and some coordinates.
box-shadow accepts comma-separated shadows. Each one is a
colored rectangle you can position anywhere — making a single
div render hundreds of pixels.
Zero-size elements with thick border values produce triangles.
The classic trick: set three borders transparent and one with color.
Sweeping colors from a center point. Hard stops create pie charts and vinyl record grooves. Soft stops produce color wheels and iridescent surfaces.
Register a CSS custom property as a typed value and the browser can interpolate
it. Animate hue-rotate, gradient angles, or radial positions
smoothly — things that were impossible before.
.triangle {
width: 0;
height: 0;
border-left: 40px solid transparent;
border-right: 40px solid transparent;
border-bottom: 70px solid #f472b6;
}
.record {
background: conic-gradient(
from 0deg,
#111 0deg,
#222 1deg,
#111 2deg
);
border-radius: 50%;
animation: spin 3s linear infinite;
}
@property --iris-hue {
syntax: '<angle>';
inherits: false;
initial-value: 0deg;
}
.iris {
background: radial-gradient(
circle,
oklch(0.5 0.3 var(--iris-hue)),
oklch(0.3 0.2 var(--iris-hue))
);
animation: shift-hue 4s linear infinite;
}
@keyframes shift-hue {
to { --iris-hue: 360deg; }
}
Sculpt with 25+ properties. Try Challenge Mode for a target-matching game.