Create CSS box-shadow layers for elevation, inset states, and colored effects.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Offsets, blur, spread, color, and inset are serialized into box-shadow functions. Blur and spread change the painted shadow shape but not the element’s layout box.
Offset x: 0 Offset y: 2 Blur: 8 Spread: 0 Color: rgba(0, 0, 0, 0.15) Inset: false
/* Box Shadow */
.shadow {
-webkit-box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);
}
Cards, pressed buttons, and design mockups generate shadow layers.