ddc
联网
平面设计 画册 VI欣赏 包装 CG-插画 搜索 个人网页 Alexa排名 CSS 建站资源 下载专区 JS特效 品牌服装 服装院校 专题欣赏 SEO 图标欣赏 专题
网站建设 域名注册 网站建设 虚拟主机 广州网站设计 域名注册 广州网站建设 上海网站建设 虚拟主机 广州网页设计 虚拟主机 域名注册 acg王国 ACG玩家 品牌设计 上海网站建设
求创科技
网站建设
中国互联
素材出售
中国设计秀
中资源
当前位置:网络学院首页 >> 设计教程 >> DIV特效代码 >> CSSfilter实现漂亮的鼠标滑过图片效果

CSSfilter实现漂亮的鼠标滑过图片效果

来源:中国设计秀    作者:straw    点击:1090     加入收藏

<P>效果图:</P>
<P><IMG alt="" src="/uploadfile/edu/uploadfile/200807/20080715104616388.jpg" width=450 border=0><BR>首先看个简单的例子吧。<BR><BR></P>

代码如下:[点击运行,可预览效果]
<br><br>
<TEXTAREA id=runcode0 rows=9 cols=72>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>http://www.cssrain.cn</title>
<style>
*{ margin:0; padding:0;}
body{ margin:0 auto; font-size:12px;}
.model{margin:0 auto; width:30px;}
.model a:hover{ text-decoration:none;}
.model a img{ border:#fff 1px solid;}
.model a:hover img{ border:#888 1px dotted;}
.model a span{ padding:0; display:block; width:80px; height:50px; margin-top:-32px; overflow:hidden; line-height:14px; filter: Alpha(opacity=0); opacity:.0; cursor:pointer; text-align:center;}


</style>
</head>
<body>
<div class="model"><a href="#"><img src="/uploadfile/edu/uploadfile/200807/20080715104616471.jpg" border="0" /></a></div>
<div class="model"><a href="#"><img src="/uploadfile/edu/uploadfile/200807/20080715104617773.jpg" border="0" /></a></div>
</body>
</html>

</TEXTAREA> <BR><INPUT id=0 onclick=runCode(this.id) type=button value=运行代码>&nbsp;&nbsp; <INPUT id=0 onclick=doCopy(this.id) type=button value=复制代码> &nbsp;&nbsp; <INPUT id=0 onclick=saveCode(runcode0) type=button value=保存代码> &nbsp;&nbsp;<BR>[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

<br>好了,看最终效果<br>

代码如下:[点击运行,可预览效果]
<br><br>
<TEXTAREA id=runcode0 rows=9 cols=72>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>http://www.cssrain.cn</title>
<style>
*{ margin:0; padding:0;}
body{ margin:0 auto; font-size:12px;}
.model{margin:0 auto; width:30px;}
.model a:hover{ text-decoration:none;}
.model a img{ border:#fff 1px solid;}
.model a:hover img{ border:#888 1px dotted;}
.model a span{ padding:0; display:block; width:80px; height:50px; margin-top:-32px; overflow:hidden; line-height:14px; filter: Alpha(opacity=0); opacity:.0; cursor:pointer; text-align:center;}
.model a:hover span{ color:#fff; background:#000; padding:0; display:block; width:84px; height:54px; margin:-36px 0 0 1px!important; margin:-36px 0 0 0px; overflow:hidden; line-height:16px; filter: Alpha(opacity=60); opacity:.6; text-align:left; text-align:center;}

 

.model2{margin:0 auto; width:30px;}
.model2 a:hover{ text-decoration:none;}
.model2 a img{ border:#fff 1px solid;}
.model2 a:hover img{ border:#888 1px dotted;}
.model2 a span{ padding:0; display:block; width:180px; height:50px; margin-top:-32px; overflow:hidden; line-height:14px; filter: Alpha(opacity=0); opacity:.0; cursor:pointer; text-align:center;}
.model2 a:hover span{ color:#fff; background:#000; padding:0; display:block; width:480px; height:16px; margin:-36px 0 0 1px!important; margin:-20px 0 0 0px; overflow:hidden; line-height:16px; filter: Alpha(opacity=60); opacity:.6; text-align:left; text-align:center;}

</style>
</head>
<body>
<div class="model"><a href="#"><img src="/uploadfile/edu/uploadfile/200807/20080715104616471.jpg" border="0" /><span>Kelvin Zegers-拉练喵</span></a></div>


<br><br><br><br><br><br><br><br><br>
<div class="model2"><a href="#"><img src="/uploadfile/edu/uploadfile/200807/20080715104617773.jpg" border="0" /><span>Kelvin Zegers-拉练喵</span></a></div>
</body>
</html>
</TEXTAREA> <BR><INPUT id=0 onclick=runCode(this.id) type=button value=运行代码>&nbsp;&nbsp; <INPUT id=0 onclick=doCopy(this.id) type=button value=复制代码> &nbsp;&nbsp; <INPUT id=0 onclick=saveCode(runcode0) type=button value=保存代码> &nbsp;&nbsp;<BR>[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

2008-07-16 00:43:00    出处:中国设计秀cnwebshow.com
Google
热点文章/相关文章
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明 | 网站公告 | 友情链接 | 留言 | 旧版入口