带阴影的图片,兼容 ff 和 ie
以下是代码:
<
style
>
.imgWrapper { background : url(image/shadow.gif) no-repeat bottom right ; line-height : 0 ; width : 310px ; margin : 30px 0 0 5px ; }
.imgWrapper img { float : none ; margin : 0 ; background : #fff ; padding : 4px ; border : 1px solid #C5BDBD ; position : relative ; left : -5px ; top : -5px ; }
</ style >
< div class ="imgWrapper" >< img src ="image/dunstan.jpg" width ="300" height ="300" title ="More wall detail (30)" /></ div >
.imgWrapper { background : url(image/shadow.gif) no-repeat bottom right ; line-height : 0 ; width : 310px ; margin : 30px 0 0 5px ; }
.imgWrapper img { float : none ; margin : 0 ; background : #fff ; padding : 4px ; border : 1px solid #C5BDBD ; position : relative ; left : -5px ; top : -5px ; }
</ style >
< div class ="imgWrapper" >< img src ="image/dunstan.jpg" width ="300" height ="300" title ="More wall detail (30)" /></ div >
本文介绍了一种在不同浏览器下实现图片阴影效果的方法,并提供了一段具体的CSS代码示例。该方法通过设置图片外层div的背景为阴影图片来达到效果,适用于FireFox和Internet Explorer等浏览器。

被折叠的 条评论
为什么被折叠?



