CSS给图片添加阴影
*{padding:0;margin:0;}
body{background:#E8EDF1;padding:20px;}
#profileAvatar {overflow:hidden;zoom:1;}
#profileAvatar i{float:left;visibility:hidden;background:url(http://files.jb51.net/demoimg/200912/avatar.gif) 0 0 no-repeat;}
#profileAvatar i i{background-position:100% 0; }
#profileAvatar i i i{background-position:0 100%;}
#profileAvatar i i i i{padding:0 5px 6px 0;background-position:100% 100%; }
#profileAvatar img{visibility:visible;display:block;padding:3px;border:1px solid #ccc;background:#fff;}
鼠标移上去显示圆滑的阴影
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
推荐阅读
javascript 年月日联动实现核心代码
复制代码 代码如下:var StartYear = 1980; var EndYear = 2500; function MonthAndDay() { this.initDDL = function(objYear,objMonth,objDay,hidYear,hidMonth,hidDay) { this.init(objYear,objMonth,objDay,hidY>>>详细阅读
本文标题:纯CSS实现的当鼠标移上图片添加阴影效果代码
地址:http://www.17bianji.com/kaifa2/JS/27415.html
1/2 1