649pages on
this wiki
Add New Page
Comment1 Share

The CSS text-shadow property is used to apply shadow effects to text and its text-decorations. Multiple shadow effects are applied front-to-back; the first shadow is on top. This property is not supported by Internet Explorer.


Value Description
<color> Optional, allowed before or after the <length> values. If <color> is not specified, a user agent-chosen color will be used. Gecko uses the value of the element's color property. Other browsers may differ. Valid color names or color codes are accepted.
<offset-x> <offset-y> Required. These <length> values set the shadow offset. <offset-x> specifies the horizontal distance. Negative values place the shadow to the left of the text. <offset-y> specifies the vertical distance. Negative values place the shadow above the text. If both values are 0, the shadow is placed behind the text (and may generate a blur effect when <blur-radius> is set). Examples of lengths are px, em, etc.
<blur-radius> Optional. This is a <length> value. If not specified, it will be 0. The higher this value, the bigger the blur, so the shadow becomes wider and lighter.

HTML example:

<div style="text-shadow:5px 5px 10px white;">TEXT</div>

That produces:


Image example: Text-shadow

CSS examples:

text-shadow:orange 0 -2px;

produces: Text-shadow Ex1

text-shadow:1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue; color:white; font:1.5em Georgia;

produces: Text-shadow Ex2

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.