text-shadow property
Specifies a comma-separated list of shadows that attaches one or more drop shadows to the specified text.
This property is read/write.
![]() ![]() |
Syntax
text-shadow: none |
<shadow>
Property values
none-
Default. Indicates there is no shadow.
- shadow
-
A comma-separated list of shadows, each specified by two to four nonzero length values and an optional color. See Remarks for specific information about usage.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | true |
| Initial Value | none |
Standards information
- CSS Text Level 3, Section 11.3
Remarks
The text-shadow property can specify one or more drop shadows. The components of each shadow are interpreted as follows:
- Required: The first length is the horizontal offset of the shadow. A positive value draws a shadow that is offset to the right of the box, a negative length to the left.
- Required: The second length is the vertical offset. A positive value offsets the shadow down, a negative one up.
- Optional: The third length is a blur distance. Negative values are not allowed. If the blur value is zero, the shadow's edge is sharp. Otherwise, the larger the value, the more the shadow's edge is blurred.
- Optional: The fourth length is a spread distance. Positive values cause the shadow shape to expand in all directions by the specified radius. Negative values cause the shadow shape to contract.
- Optional: The color is the color of the shadow.
Examples
The following example applies a dark gray shadow with a small blur value slightly to the right and under the specified text:
.myselector
{
...
text-shadow: 0.1em 0.1em 0.15em #333;
}
See also
Show:

