CSS box-shadow explained: offsets, blur, spread and inset

A box-shadow has up to five values. CSS box shadow generator lets you adjust them with sliders and copy the result.

Steps

  1. Set horizontal and vertical offsets.
  2. Set blur and spread.
  3. Pick the colour and opacity.
  4. Tick Inner shadow for an inset shadow, then copy the CSS.

Use cases

  • Cards and modals.
  • Pressed-in buttons and inputs.
  • Soft depth on light backgrounds.

Tips

  • Soft shadows look best at low opacity (0.15 to 0.3).
  • A small negative spread keeps large blurs tidy.
  • box-shadow follows the rectangle. For transparent PNG or SVG icons use the drop-shadow filter.

All guides

↑ ↓ navigateEnter openEsc close