Adding Drop Shadows to Other Elements

The text-shadow property allows you to apply shadows to an element’s text, but the box-shadow property allows you to add shadows to the elements themselves (Image and Image). Although based on the same basic set of attributes, box-shadow allows two more optional attributes—the inset keyword attribute, and the spread attribute to expand or shrink the shadow.

Image This document contains three divs that demonstrate using box-shadow ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.