CSS3 Box Shadow

Shadows have been around since the beginning of CSS2, however the only browser supporting them then (and continually now) was Safari. Shadows can be applied in CSS3 to borders, images as well as affecting text as well.

The CSS3 box-shadow is written box-shadow: Apx Bpx Cpx #XXX;
- Apx = x-axis
- Bpx = y-axis
- Cpx = cast length / feathering
- #XXX = colour as usual

This is a panel set with a 5 by 5 pixel box-shadow, cast by 7px.

  1. CSS3 Border Shadow
  2. #my_CSS3_id {
  3.   border: 5px solid #c4c8cc;
  4.   box-shadow: 5px 5px 7px #888;
  5.   border-radius: 0 0 15px 0;
  6. }

This effect can also be applied to images... image

 

The Zen Elements CSS3 Series

Thank you for reading!
@zen