CSS3 text-shadow property
Examples
Basic text shadow (text-shadow):
h1
{
text-shadow: 2px 2px # ff0000;
}
{
text-shadow: 2px 2px # ff0000;
}
try it"
In the bottom of this page for more examples.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
text-shadow | 4.0 | 10.0 | 3.5 | 4.0 | 9.6 |
Attribute definitions and instructions
text-shadow property applies shadow text.
Defaults: | none |
---|---|
inherit: | yes |
version: | CSS3 |
JavaScript syntax: | object .style.textShadow = "2px 2px # ff0000" |
grammar
text-shadow:h-shadow v-shadow blur color;
Note: text-shadow property is connected to one or more of the shadow text.Property is shadow, designated every two or three length values and an optional color values separated by commas. Spent a length of 0.
value | description |
---|---|
h-shadow | Required. Position of the horizontal shadow. Allow negative. |
v-shadow | Required. The vertical position of the shadow. Allow negative. |
blur | Optional. Fuzzy distance. |
color | Optional. Shadow color. See CSS color values . |
More examples
Text shadow blur
This example demonstrates a text shadow blur.
White text on a text shadow
This example demonstrates a white text text shadow.
Neon glow text shadow
This example demonstrates the use of neon light text shadow.
related articles
CSS3 tutorial: CSS3 the Text Effects