鼠标经过缩略图时立即切换显示大图显示效果,常用于产品展示或图片展示功能,根据自身网站布局来修改。
<!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=utf-8" /> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>鼠标经过缩略图感应大图切换显示js特效_武鸣人</title> <style> body,ul,li{margin:0;padding:0;} body{background:#000;} img{border:0;border-radius:3px;} ul{list-style-type:none;} #box_www_wuming_ren{width:212px;border:5px solid #fff;overflow:hidden;zoom:1;background:#fff;border-radius:5px;margin:10px auto;padding:0 0 3px 3px;} #box_www_wuming_ren li,#box_www_wuming_ren li img{float:left;width:50px;height:50px;} #box_www_wuming_ren li{margin:3px 3px 0 0;} #box_www_wuming_ren li.first{position:relative;} #box_www_wuming_ren li.first,#box_www_wuming_ren li.first img{width:156px;height:156px;} #box_www_wuming_ren li.first div{position:absolute;top:0;left:0;width:156px;height:156px;display:none;opacity:0.5;filter:alpha(opacity=50);background:#fff url(/img/20240224_www_wuming_ren_7.gif) 50% 50% no-repeat;} </style> <script type="text/javascript"> window.onload = function () { var oImg = document.getElementById("box_www_wuming_ren").getElementsByTagName("img"); var oDiv = document.getElementsByTagName("div")[0]; for (var i = 1; i < oImg.length; i++) { oImg[i].onmouseover = function () { var img = new Image(); img.src = oImg[0].src = this.src.replace(/wuming_s/,"wuming_big"); oDiv.style.display = "block"; img.complete ? oDiv.style.display = "none" : (oImg[0].onload = function() {oDiv.style.display = "none"}) } } };//武鸣人网站https://www.wuming.ren 网站域名很好记住,wuming.ren(武鸣拼音.ren域名后缀) </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> <ul id="box_www_wuming_ren"> <li class="first"><img src="/img/wuming_big_11.jpg"><div></div></li> <li><a href="javascript:;"><img src="/img/wuming_s_1.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_2.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_3.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_4.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_5.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_6.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_7.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_8.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_9.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_10.jpg"></a></li> <li><a href="javascript:;"><img src="/img/wuming_s_11.jpg"></a></li> </ul> </body> </html>
本文来自武鸣人网站,转载请注明出处