Text shadows
Internet Explorer 10 and Windows apps using JavaScript support drop shadows on text using the Cascading Style Sheets, Level 3 (CSS3) text-shadow property.
The text-shadow property
The text-shadow property applies a drop shadow effect to the specified text, and is defined in the World Wide Web Consortium (W3C) CSS Text Decoration Module Level 3. If you are familiar with the syntax for the box-shadow property, you already know the syntax for text-shadow; they are almost identical.
Property | Description |
---|---|
A comma-separated list of shadows that attaches one or more drop shadows to the specified text. Each shadow is made up of a space-delimited list of the following:
|
The syntax for the text-shadow property is identical to the syntax for the box-shadow property, except that the text-shadow property does not recognize the inset keyword.
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;
}
This results in the following when the selector is applied to a short text block:
The W3C has a page full of text-shadow tips and examples: CSS text shadows.
API Reference
Samples and tutorials
How to add fun text effects using CSS
Internet Explorer Test Drive demos
IEBlog posts
Moving to Standards-based Web Graphics in IE10
Specification
CSS Text Decoration Module Level 3: Section 4