CSS box-shadow Property Explained

What the CSS box-shadow property does, with an example.

Published November 4, 2026

The CSS box-shadow property adds a drop shadow effect around an element's box.

Key points

  • Check browser compatibility on a resource like caniuse.com if targeting older browsers

Example

box-shadow: 0 2px 8px rgba(0,0,0,0.15);
More CSS articles