Creating Text Shadows

Description

The text-shadow property applies a shadow to a block of text.

Its value is defined as follows:


   <h-shadow> <v-shadow> <blur>  <color>

The h-shadow and v-shadow values specify the offset for the shadow. Values are expressed as lengths and negative values are allowed.

The optional blur value is length value and specifies the degree of blur.

The color value specifies the color of the shadow.

Example

The following code shows the text-shadow property in use.


<!DOCTYPE HTML>
<html>
<head>
<style>
h1  {<!--  w w  w .ja v  a  2  s  .c  o  m-->
    text-shadow: 0.1em  .1em  1px  lightgrey;
}
p  {
    text-shadow: 5px  5px  20px  black;
}
</style>
</head>
<body>
    <h1>Thoughts  about   Fruit</h1>
    <p>this is a test.</p>
</body>
</html>

Click to view the demo





















Home »
  HTML CSS »
    CSS »




CSS Introduction
CSS Background
CSS Border
CSS Box Layout
CSS Text
CSS Font
CSS Form
CSS List
CSS Selectors
CSS Others
CSS Table