crus4

logo
CSS Text Shadow

CSS Text Shadow


The CSS text-shadow property adds shadow to text. This property accepts other shadow properties that are applied to the text.

Syntax

text-shadow: h-shadow v-shadow blur-radius color;

Property Values

  • h-shadow: This property is used to specify the position of horizontal shadow.
  • v-shadow: This property is used to specify the position of the vertical shadow.
  • blur-radius: This property is used to set the blur radius. This property is optional and it’s default value is 0.
  • color: This property is used to set the color of the shadow. Like blur-radius property it is also optional.

CSS Text Shadow

In an example below let’s write a code and design the text with text-shadow property.

Example

<html>
<head>
<style>
h1 {
  text-shadow: 4px 4px 8px #000000;
}
</style>
</head>
<body>
<h1>Text shadow property</h1>
</body>
</html>

The text-shadow property is supported by almost all major browsers.


CSS Text Shadow

Leave a Reply

Your email address will not be published. Required fields are marked *