AdBlock Detected!
Our website is made possible by displaying ads to our visitors. Please supporting us by whitelisting our website.
CSS text-shadow Property |
The text-shadow property in CSS allows web designers to add shadow effects to text. This property is introduced as part of the CSS3 standard, and is supported by all the major browsers today. The syntax for text-shadow is as follows:
Note that the order of the values is important. For example, offset-x always occurs before offset-y. In addition, while the box-shadow property has a spread-radius value, text-shadow does not. Example 1 CSS declaration:
The following HTML,
renders, Text-shadow property example 1.
Notice the text shadow extends to the right of the text by 5px and below the text by 5px. Example 2: Negative offset values CSS declaration:
The following HTML,
renders, Text-shadow property example 2.
Notice the text shadow extends to the left of the text by 10px and above the text by 10px. Example 3: Blur radius CSS declaration:
The following HTML,
renders, Text-shadow property example 3.
Notice that by setting blur-radius to 3px, now the shadow is blurry and no longer sharp. Example 4: Multiple shadows CSS declaration:
The following HTML,
renders, Text-shadow property example 4.
Notice the presence of two shadows, one to the upper-left of the text, and the other to the lower-right of the text. |
Our website is made possible by displaying ads to our visitors. Please supporting us by whitelisting our website.