<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS3实现的图片圆角及阴影特效_网页代码站(www.webdm.cn)</title>
<style type="text/css">
a{ text-decoration:none;}
img{border:none}
.gallery{position:relative;z-index:1; width:422px; margin-bottom:30px}
.gallery a{
display:block; padding:10px;background:#fffef9;
border-radius:1px;border: 1px solid #756359;box-shadow:inset 0 0 10px rgba(52,54,57, 0.2);z-index:1;
}
.gallery img{border-radius:10px;}
.gallery a:before, a:after{
content:''; position:absolute; z-index:-2; width:60%;height:10%; top:87%; left: 20px;
box-shadow:0 10px 7px rgba(0, 0, 0, 0.7);
-webkit-transform:skew(-16deg) rotate(-3deg); -moz-transform:skew(-16deg) rotate(-3deg); transform:skew(-16deg) rotate(-3deg);
}
.gallery a:after{
left:auto;right: 20px; -webkit-transform:skew(16deg) rotate(3deg);-moz-transform:skew(16deg) rotate(3deg);transform:skew(16deg) rotate(3deg);
}
.gallery a:hover{border:1px solid rgba(52,54,57, 0.4);box-shadow:inset 0 0 10px rgba(52,54,57, 0.3);z-index:1;}
.gallery a:hover:before, a:hover:after{box-shadow:0 10px 7px rgba(0, 0, 0, 0.9);}
</style>
</head>
<body>
<div class="gallery"><a href="#"><img src="/p_w_picpaths/wall3.jpg" /></a></div>
<br>
<p><a href="http://www.webdm.cn">网页代码站</a> - 最专业的网页代码下载网站 - 致力为中国站长提供有质量的网页代码!</p>
</body>
</html>
转载于:https://blog.51cto.com/sanye/1345018