手机版

js鼠标移动显示图片的简单实例

时间:2021-11-12 来源:互联网 编辑:宝哥软件园 浏览:

一、js代码复制代码代码如下://***********默认设置定义* * * * * * * * * * * tPopWait=50//停留tWait豪秒后显示提示tPopShow=5000//显示tShow豪秒后关闭提示showPopStep=20 popopacity=99/* * * * * * * * * * *内部变量定义* * * * * * * * * * * * * SPop=NullCursHaw=NulltFadeOut=NulltFadeIn=NulltFadeWaiting=nulldocument。write(' MCE :样式类型=' text/CSS ' id=' defaultPopStyle '!- ');document.write(' .cPopText {换行:正常;断字:断字;背景-颜色: # FEFCF 3;color : # 000000 border : 1px # E7B 68C固体;衬垫-top : 2px;填充-右侧: 4px左填充left : 4 xpadd-bottom : 2px;font-size : 12px宽度:96 pxfilter: Alpha(不透明度=0)} ');文件。write('-/MCE : style type=' text/CSS ' id=' Defaultpopstyle ' MCE _ push=' 1 ');document.write(' .cPopText {换行:正常;断字:断字;背景-颜色: # FEFCF 3;color : # 000000 border : 1px # E7B 68C固体;衬垫-top : 2px;填充-右侧: 4px左填充left : 4 xpadd-bottom : 2px;font-size : 12px宽度:96 pxfilter: Alpha(不透明度=0)} ');文件。write('/style ');文件。write(' div id=' dypopLayer ' style=' position : absolute;z指数:1000;MCE _ style='位置:绝对;z指数:1000;class=' cPopText '/div ');函数showpopuptext(){ var o=event。加速;MouseX=event . xmousey=event . yif(o . alt!=null o.alt!=' '){ o . dypop=o . alt;o . alt=' ' };if(o.title!=null o.title!=' '){ o . dypop=o . title;o . title=' ' };if(o.dypop!=SPop){ SPop=o . dypop;clear time out(curShow);clear time out(tFadeOut);clear time out(tFadeIn);clear time out(tFadeWaiting);if(SPop==null | | SPop==' '){ dypoplayer。innerhtml=dypoplayer。风格。筛选器=' Alpha()';dypopLayer.filters.Alpha不透明度=0;} else { if(o.dyclass!=null)pop STYLe=o . dy class else pop STYLe=' CPOpText ';curShow=setTimeout('showIt()',tPopWait);} } }函数showIt(){ dypoplayer。类名=流行风格;dypoplayer . innerhtml=sPoppop width=dypoplayer。客户端宽度;pop高度=dypoplayer。客户身高;if(MouseX 12弹出宽度文档。尸体。客户端宽度)popLeftAdjust=-pop width-else 24 popLeftAdjust=0;if(MouseY 12 popheighttdocument。尸体。客户端高度)popTopAdjust=-pop高度-24 else popTopAdjust=0;dypoplayer。风格。left=MouseX 12文档。尸体。滚动popLeftAdjustdypoplayer。风格。top=MouseY 12文档。尸体。滚动顶部popTopAdjustdypopLayer.style.filter='Alpha(不透明度=0 ';淡出();}函数淡出(){ if(dypoplayer。过滤器。阿尔法。不透明度(popopacity){ dypoplayer。过滤器。阿尔法。不透明度=showPopSteptFadeOut=setTimeout('fadeOut()',1);} else { dypoplayer。过滤器。阿尔法。不透明度=予言容量;tFadeWaiting=setTimeout(' fadeIn()',tPopShow);} }函数淡入(){ if(dypoplayer。过滤器。alpha不透明度0){ dypoplayer。过滤器。alpha不透明度-=1;tFadeIn=setTimeout('fadeIn()',1);} }文档。onmouseover=showpopupptext二、html代码包含射流研究…代码即可,使用范例a href='./UpLoadFile/200911784060017。jpg ' target=' _ blank ' title=' img src=./UpLoadFile/200911784060017。jpg/'大/aa href='./UpLoadFile/200911784060018。jpg ' target=' _ blank ' title=' img src=./UpLoadFile/200911784060018。使用jpeg文件交换格式存储的编码图像文件扩展名宽度=96高度=70 /'小/a

版权声明:js鼠标移动显示图片的简单实例是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。