Example

A simple box-shadow property example:

Laboratory

description & Usage

We use the box-shadow property to create a shadow.

Informations

# Description
Default Value none
Inherited no
Animatable yes
Version CSS3
JavaScript syntax object.style.boxShadow="10px 20px 30px blue"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
box-shadow

Syntax

Values

Values Description
none No shadows are displayed.
h-offset Places a positive shadow value on the right side of the box and a negative shadow value on the left side of the box.
v-offset A positive value places the shadow below the box and a negative value places the shadow above the box.
blur It is used for matting the color of the shadows.
spread This value is optional; By default, it determines the radius of the expansion of colored shadows.
color This value is optional; By default, it is the text color.
inset This value is optional; By default, it is the text color.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.