CSS box-shadow property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
CSS box-shadow drops a shadow of a box. The shadow may be either inside or outside of a box.
Syntax
box-shadow : none | X-offset Y-offset blur-radius spread-distance shadow-color [ inset ]
Property values
Property values
X-offset value
-
It represents the offset of shadow along X-axis. right (+ve value) or left (-ve value) offset.
- Try it
box-shadow: 5px;
Y-offset value
-
It represents the offsetof shadow along Y-axis. bottom (+ve value) or top (-ve value) offset.
- Try it
box-shadow: 4px;
inner shadow
-
This 'inset' keyword transforms the box-shadow from outer side to inner side.
- Try it
box-shadow: inset;
Applicable to
It applies to all elements