In this article, we will learn how to Apply Shadow Effect on Text Using CSS. The text-shadow property of CSS is used to apply the shadow effect on text.
Approach: The text-shadow property of CSS is used to apply the shadow effect on text. It takes four values vertical_shadow, horizontal_shadow, blur, and color. All the details of the properties that text-shadow properties take are below:
- vertical_shadow: It is the position of the shadow of the text vertically.
- horizontal_shadow: It is the position of the shadow of the text horizontally.
- blur: It is the value of how much blur shadow we want. It is optional.
- color: It is the color of the shadow.
text-shadow: vertical_shadow horizontal_shadow blur color;
- Before applying text-shadow property:
Example 2: This example shows you how the blur value works in text-shadow property.
Before applying text-shadow property with blur value:
After applying text-shadow property with blur value: