找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 68349|回复: 117

Discuz图片效果jquery hover鼠标悬停遮罩显示

 火... [复制链接]
发表于 2014-9-8 12:58:22 | 显示全部楼层 |阅读模式
效果预览:
QQ截图20140908133920.png

视频教程:         
教程中所使用到的编辑器:Notepad++ 一款非常有特色的编辑器
http://www.dz7.com.cn/discuz-84-1-1.html




素材使用方法:

  • 下载素材附件,将附件解压,把DZ7整个文件夹上传至网站跟目录!
  • 附件
    游客,如果您要查看本帖隐藏内容请回复
  • 请将下面的代码全部复制到DIY模板里面,然后设置图片的  宽度:262     高度:148
  • 保存即可!



本素材由DZ起点网独家提供,转载请说明出处!
DZ起点网 www.dz7.com.cn   专注于Discuz!               
               
从以下位置开始复制        


  1. <style type="text/css">
  2. /* case */
  3. .case{margin:0 auto;width:auto;}
  4. .case li{float:left;display:inline;margin-right:22px;margin-left:22px;width:275px;height:215px; background:url(dz7/images/bg_case_f.png) center bottom no-repeat;position:relative;}
  5. .case li .case_w{display:block;width:262px;height:145px;padding:20px;background:url(dz7/images/bg_case.png) no-repeat;position:absolute;bottom:14px;left:0px;}
  6. .case li .case_w .fire{background:#000;opacity:0.5;filter:alpha(opacity=50);position:absolute;top:20px;left:20px;width:262px;height:148px;z-index:2;display:none; text-align:center; }
  7. .case li .case_w  .x,.case li .case_w  .y{width:61px;height:61px;top:60px;position:absolute;z-index:3;display:none;}
  8. .case li .case_w  .x{background:url(dz7/images/zoom-icon.png); left: 50px;}
  9. .case li .case_w  .y{background:url(dz7/images/readmore-icon.png);right:50px;}
  10. </style>
  11. <script type="text/javascript" src="dz7/js/jq-1.7.2.min.js"></script>
  12. <ul class="case">
  13. [loop]
  14.         <li>
  15.                 <div class="case_w">
  16.                         <img alt="{title}" width="{picwidth}" height="{picheight}"  src="{pic}">
  17.                         <div class="fire"></div>
  18.                         <a href="{url}" class="x"></a>
  19.                         <a href="{url}" class="y"></a>
  20.                 </div>
  21.         </li>
  22. [/loop]
  23. </ul>
  24. <script type="text/javascript">
  25. jQuery.noConflict();
  26. var jq=jQuery;
  27. jq(function(){
  28.         jq(".case li").hover(function(){
  29.                 jq('.case_w',this).stop().animate({"bottom":"30px"},400);        
  30.                 jq(".x",this).stop().css({'left':'50px'}).animate({'left':"80px"},400).show();
  31.                 jq(".y",this).stop().css({'right':'50px'}).animate({'right':"80px"},400).show();
  32.                 jq('.fire',this).show();
  33.         },function(){
  34.                 jq('.case_w',this).stop().animate({"bottom":"14px"},400);
  35.                 jq('.fire, .x, .y',this).hide();
  36.         });        
  37. });
  38. </script>
  39. </div>
复制代码






回复

使用道具 举报

发表于 2015-1-24 16:48:07 | 显示全部楼层
强力支持,找了好久才找见
回复 0 1

使用道具 举报

发表于 2015-1-10 08:29:07 | 显示全部楼层
DIY简洁的有序列表素材DIY简洁的有序列表素材DIY简洁的有序列表素材
回复 0 1

使用道具 举报

发表于 2015-1-5 22:15:41 | 显示全部楼层
吸收学习 大有帮助啊
回复 0 1

使用道具 举报

发表于 2014-12-26 15:29:32 | 显示全部楼层
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_taobao" data-cmd="taobao" title="分享到我的淘宝"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_copy" data-cmd="copy" title="分享到复制网址"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","taobao","renren","twi","weixin","copy"],"viewText":"分享到:","viewSize":"32"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","taobao","renren","twi","weixin","copy"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
回复 0 1

使用道具 举报

发表于 2014-12-24 14:53:55 | 显示全部楼层
吸收学习 大有帮助啊
回复 0 1

使用道具 举报

发表于 2014-12-23 19:41:33 | 显示全部楼层
曾哥 发表于 2014-12-19 21:02
这个效果挺好,就是悬停时上面两个按钮没多大作用,都是指向同一个链接,能改成一个按钮么或改成显示标题也 ...

可以自己尝试去编辑
回复 0 1

使用道具 举报

发表于 2014-12-23 19:37:42 | 显示全部楼层
谢谢   我把这个也学会了
回复 0 1

使用道具 举报

发表于 2014-12-19 21:02:50 | 显示全部楼层
这个效果挺好,就是悬停时上面两个按钮没多大作用,都是指向同一个链接,能改成一个按钮么或改成显示标题也成
回复 0 1

使用道具 举报

发表于 2014-12-18 14:36:32 | 显示全部楼层
好东西哦搞来看看
回复 0 1

使用道具 举报

发表于 2014-12-17 21:18:26 | 显示全部楼层
r鼠标悬停遮罩显示
回复 0 1

使用道具 举报

发表于 2014-9-10 23:41:33 | 显示全部楼层
kankan ............
回复

使用道具 举报

发表于 2014-9-14 21:59:22 | 显示全部楼层
吸收学习 大有帮助啊
回复 1 0

使用道具 举报

发表于 2014-9-16 09:52:16 | 显示全部楼层
回复

使用道具 举报

发表于 2014-9-16 23:12:15 | 显示全部楼层
本帖最后由 晓宇 于 2014-9-16 23:15 编辑

搞定了 、
回复

使用道具 举报

发表于 2014-9-27 13:45:58 | 显示全部楼层
支持一下
回复

使用道具 举报

发表于 2014-10-6 12:02:19 | 显示全部楼层
感谢群主啊,谢谢分享
回复 0 1

使用道具 举报

发表于 2014-10-6 18:13:28 | 显示全部楼层
谢谢分享谢谢分享谢谢分享谢谢分享谢谢分享谢谢分享谢谢分享谢谢分享
回复 0 1

使用道具 举报

发表于 2014-10-8 18:26:49 | 显示全部楼层
强力支持,找了好久才找见
回复 0 1

使用道具 举报

发表于 2014-10-9 09:44:04 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Discuz代码分析|Discuz目录结构|DZ起点网 ( 蜀ICP备13000518号-15 )

GMT+8, 2024-4-20 04:18 , Processed in 0.061106 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表