text-shadow

The text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its decorations. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color.

Example

Initial value none
Applies to all elements. It also applies to ::first-letter and ::first-line.

Syntax

  
text-shadow: 4px 4px #edbff9;
  

Values

Optional. The color of the shadow. It can be specified either before or after the offset values. If unspecified, the color's value is left up to the user agent, so when consistency across browsers is desired you should define it explicitly.
Required. These values specify the shadow's distance from the text. specifies the horizontal distance; a negative value places the shadow to the left of the text. specifies the vertical distance; a negative value places the shadow above the text. If both values are 0, the shadow is placed directly behind the text, although it may be partly visible due to the effect of .
Optional. This is a value. The higher the value, the bigger the blur; the shadow becomes wider and lighter. If not specified, it defaults to 0.

Browser support

text-shadow2123.5109.51.1

We use cookies to improve your experience. Learn more in our Privacy policy.

×