Layer several box-shadows or text-shadows, set offset, blur, spread and colour against a live preview, and copy the shorthand in the correct order.
Several small shadows read as depth far more convincingly than one large blur. A tight, nearly opaque layer for the contact edge and a wide, faint one for the ambient light is the usual recipe.
.shadowed {
box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.15);
}CSS Box Shadow Generator runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
A single shadow almost never looks like real light. What reads as depth is usually two or three shadows together: a tight dark one just under the element for contact, and a wider, fainter one spread further out for ambient light. This stacks as many as you need and keeps them in order, because in `box-shadow` the first shadow in the list paints on top of the ones after it.
Spread is the control people miss. Offset moves the shadow, blur softens its edge, and spread grows or shrinks the shadow's shape before either of those happens — a negative spread with a large blur is how you get a shadow that stays tucked under an element instead of leaking out around its sides.
Inset shadows are the same syntax pointed inward, and they are how you get a pressed button, an inner border that does not affect layout, or a subtle top highlight. Mixing inset and outset shadows in one list is allowed and often what you want.
Text shadows take the same offsets and blur but have no spread and no inset, so the tool switches off the controls that would produce invalid CSS rather than printing something a browser will drop. The preview is rendered with a style object, so a value that would not parse simply does not appear — it cannot leak into the page around it.
It grows or shrinks the shadow's shape before the blur is applied. A positive spread makes the shadow larger than the element; a negative spread makes it smaller, which is how you keep a soft shadow from leaking out past the element's sides.
The first one in the list. That is the opposite of what most people assume, and it matters as soon as two of your layers overlap at different opacities.
Because a fully opaque black shadow reads as a grey smear. Real shadows are low-alpha black over whatever is behind them, so two or three layers at 5–15% alpha look far more like light than one at 100%.
You can, and a box-shadow ring does not affect layout the way a border does. Be aware it is clipped by overflow on an ancestor and it does not follow a transform, which is why outline is usually the better choice for focus specifically.
Almost. Text shadows take x and y offsets, a blur and a colour, but they have no spread value and cannot be inset. Writing either into a text-shadow makes the whole declaration invalid, so those controls are not offered in text mode.