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
- Set horizontal and vertical offsets.
- Set blur and spread.
- Pick the colour and opacity.
- 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.