通过滚动鼠标滚轮来实现信息上下滚动显示特效,很实用的一款鼠标滚轮特效,结合自己的需求来修改即可。
<html> <head> <script type="text/javascript"> function handle(www_wuming_ren) { var s = www_wuming_ren + ": "; if (www_wuming_ren <0) s += "武鸣人提示您:down"; else s += "武鸣人提示您:up"; document.getElementById('www_wuming_ren').innerHTML = s; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function wheel(event){ var www_wuming_ren = 0; if (!event) event = window.event; if (event.wheelDelta) { www_wuming_ren = event.wheelDelta/120; if (window.opera) www_wuming_ren = -www_wuming_ren; } else if (event.detail) { www_wuming_ren = -event.detail/3; } if (www_wuming_ren) handle(www_wuming_ren); }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) /* Initialization code. */ if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false); window.onmousewheel = document.onmousewheel = wheel; </script> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div id="www_wuming_ren">滚动鼠标中间的滚轮可以看到效果</div> </body> </html>
本文来自武鸣人网站,转载请注明出处