/

HTML / CSS / JavaScript Tutorial

CSS Property: text-shadow

[this page | pdf | back links]

The CSS (CSS3) text-shadow property indicates what shadow should be added to text. To add more than one shadow, the property should be set to a comma-separated list of shadows.

 

Valid property values (other than inherit and initial) are:

 

Value

Description

none

(default value). No shadow

h-shadow v-shadow blur-radius color

2 to 4 parameters:

-        h-shadow (required): position of horizontal shadow (can be negative)

-        v-shadow (required): position of vertical shadow (can be negative)

-        blur-radius (optional): how fuzzy (default is zero)

-        color (optional): CSS colour of shadow (default is colour of text)

 

Default Value:

none

JavaScript syntax:

e.g. object.style.textShadow="2px 10px 5px blue"

Inherited:

Yes

Animatable:

Yes

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile