text-shadow css property explained
The text-shadow property in CSS is used to add shadows to text, allowing you to create depth and relief effects for these elements. This property takes a few parameters that control the appearance of the shadow:
-
Offset X
This parameter specifies the shadow's horizontal offset. With a positive value, the shadow will move to the right, while a negative value will move it to the left.
-
Offset Y
This parameter specifies the shadow's vertical offset. With a positive value, the shadow will move downward, while a negative value will move it upward.
-
Blur Radius
This parameter determines how blurry the shadow will be. A larger value will make the shadow appear less defined and more diffused.
-
Color
This parameter specifies the shadow's color. You can use values like color names, hexadecimal codes, rgba() or hsla() functions to set the color.
Note: To attach more than one text shadow, add a comma-separated list of shadows text-shadow: 2px 5px 34px rgba(201, 201, 201, 0.65), 10px 15px 8px lightred;
Read more about the CSS text-shadow property on:
MDN - text-shadow - w3schools.com
Daily projects you can build to
improve your coding skills!
