Easy Tutorial
❮ Pr Pos Top Pr Border Top Color ❯

CSS3 text-shadow Property

Example

Basic text shadow:

h1 {
    text-shadow: 2px 2px #ff0000;
}

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
text-shadow 4.0 10.0 3.5 4.0 9.6

Property Definition and Usage

The text-shadow property applies shadow to text.

Default value: none
Inherited: yes
--- ---
Version: CSS3
--- ---
JavaScript syntax: object.style.textShadow="2px 2px #ff0000"
--- ---

Syntax

Note: The text-shadow property connects one or more shadow texts. The property is a shadow, specified with 2 or 3 length values and an optional color value separated by commas. A deprecated length is 0.

Value Description
h-shadow Required. The position of the horizontal shadow. Negative values are allowed.
v-shadow Required. The position of the vertical shadow. Negative values are allowed.
blur Optional. The blur distance.
color Optional. The color of the shadow. See CSS Color Values

More Examples

Text Shadow Blur Effect

Text Shadow on White Text

Neon Glow Text Shadow


Related Articles

CSS3 Tutorial:

❮ Pr Pos Top Pr Border Top Color ❯