W3C.US

  • Increase font size
  • Default font size
  • Decrease font size
Home Tutorial HTML5 Use box shadow to beautify your html tabs.

Use box shadow to beautify your html tabs.

E-mail Print PDF

I'd like to show you how to use the box-shadow property in CSS3.

The Syntax:

box-shadow: none | <shadow> [ , <shadow> ]*

<shadow> = inset? && [ <length>{2,4} && <color>? ]
For example:
box-shadow: 10 10;
box-shadow: -5 -5 10;
box-shadow: inset -5 -5 5 #888;
  1. inset means that the shadow inside the element;
  2. first number is the shadow's x offset;
  3. second number is the shadow's y offset;
  4. third number is the shadow's blur radius;
  5. fourth number is the spread distance of the shadow;
  6. the last is the color.
Using box shadow, you can beautify your HTML tabs looking.
See the demo.

Last Updated on Monday, 25 July 2011 03:45