—————————————————————-rA9中国教程在线 FirstrA9中国教程在线 To create the effect, you first need to apply your shadow graphic to the background of therA9中国教程在线 wrapper div. Because divs are block-level elements, they stretch horizontally, taking up allrA9中国教程在线 the available space. In this situation we want the div to wrap around the image. You canrA9中国教程在线 do this by explicitly setting a width for the wrapper div, but doing so reduces the usefulnessrA9中国教程在线 of this technique. Instead, you can float the div, causing it to “shrink-wrap” on modernrA9中国教程在线 browsers, with one exception: IE 5.x on the Mac.rA9中国教程在线 .img-wrapper {rA9中国教程在线 background: url(shadow.gif) no-repeat bottom right;rA9中国教程在线 clear: right;rA9中国教程在线 float: left;rA9中国教程在线 }rA9中国教程在线 To reveal the shadow image and create the drop shadow effect (see Figure 3-13), you needrA9中国教程在线 to offset the image using negative margins:rA9中国教程在线 .img-wrapper img {rA9中国教程在线 margin: -5px 5px 5px -5px;rA9中国教程在线 }rA9中国教程在线