22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

36<br />

Part V: The Future of (X)<strong>HTML</strong><br />

The box-shadow attribute works with element boxes (the rectangular region<br />

that surrounds any kind of <strong>HTML</strong> element as rendered) and with the boundary<br />

around the edge of a graphic. The text-shadow attribute creates a<br />

shadow around individual characters inside some kind of block element (a<br />

paragraph in the following example). See Figure 20-5, and visit our <strong>CSS</strong>3 shadows<br />

example at www.dummieshtml.com/examples/ch20/shadows.<br />

Figure 20-5: Look for shadows around the outlined text box, bare text,<br />

and an image.<br />

Both of the shadow properties take three length values and a color as their<br />

attributes, as shown in text-shadow: 2px 2px 7px #010101; in the preceding<br />

code snippet. The three lengths take the following meanings (and the<br />

color defines the color for the shadow):<br />

✓ Shadow horizontal offset, where a positive value falls to the right and a<br />

negative value falls to the left<br />

✓ Shadow vertical offset, where a positive value falls below and a negative<br />

one falls above<br />

✓ Blur radius, where if the value is zero (0), the shadow is sharp; the<br />

higher the value gets the more blurred the shadow will be

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!