大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网页设计 -> 网页特效 -> 鼠标右键显隐效果

鼠标右键显隐效果

时间: 2021-07-31 作者:daque

把如次代码介入<body>地区中<style>body,td,a {font-size:9pt;color:black}.none{border:black 1px solid;background:d9d9d9;padding-top:2}.over {border:black 1px solid;background:707888;color:white;padding-top:2}</style><body oncontextmenu="return false"><div style="position:absolute; left: 100; top: 100;cursor: hand;display='none';" id=plane onmousedown="down=true;divleft=event.clientx-parseint(plane.style.left);divtop=event.clienty-parseint(plane.style.top)" onmouseup="down=false"><div align=center style="position:absolute; left:150px; top:33px; width:100px; height:19px; z-index:1;color:white;background:707888;cursor:default;" class="none" onmouseover="menuin();init()">右键菜单</div><div align=center id="item1" style="position:absolute; left:50px; top:55px; width:99px; height:19px; z-index:2; filter:alpha(opacity=0)" onmouseover="this.classname='over';menuin()"onmouseout="this.classname='none';" class="none">菜单项一</div><div align=center id="item2" style="position:absolute; left:250px; top:77px; width:99px; height:19px; z-index:3;filter:alpha(opacity=0)"class=none onmouseover="this.classname='over';menuin()"onmouseout="this.classname='none';">菜单项二</div><div align=center id="item3" style="position:absolute; left:50px; top:99px; width:99px; height:19px; z-index:4; filter:alpha(opacity=0)"class=none onmouseover="this.classname='over';menuin()"onmouseout="this.classname='none';">菜单项三</div><div align=center id="item4" style="position:absolute; left:250px; top:121px; width:99px; height:19px; z-index:5;filter:alpha(opacity=0)"class=none onmouseover="this.classname='over';menuin()"onmouseout="this.classname='none';">菜单项四</div> <div align=center id="item5" style="position:absolute; left:50px; top:143px; width:99px; height:19px; z-index:6; filter:alpha(opacity=0)"class=none onmouseover="this.classname='over';menuin()"onmouseout="this.classname='none';">菜单项五</div>

</div><script language="vbs">dim down,divleft,divtop,timelinestart,timelinestop,tidone,tidtwo,tidtreedown=falsetimelinestart=0timelinestop=0sub document_onmousedownif window.event.button=2 thenplane.style.display=""plane.style.left=window.event.clientx-153plane.style.top=window.event.clienty-35end ifend subsub document_onmousemoveif down thenplane.style.left=window.event.clientx-divleftplane.style.top=window.event.clienty-divtopend if

end subsub document_ondargstartwindow.event.returnvalue=falseend subfunction menuin()cleartimeout(tidtree)end functionsub document_onclicktidtree=settimeout("outit()",200)end subfunction init()if timelinestart<>5 thencleartimeout(tidtwo)item1.style.pixelleft=item1.style.pixelleft+20item1.filters.alpha.opacity=item1.filters.alpha.opacity+20item2.style.pixelleft=item2.style.pixelleft-20item2.filters.alpha.opacity=item2.filters.alpha.opacity+20item3.style.pixelleft=item3.style.pixelleft+20item3.filters.alpha.opacity=item3.filters.alpha.opacity+20item4.style.pixelleft=item4.style.pixelleft-20item4.filters.alpha.opacity=item4.filters.alpha.opacity+20item5.style.pixelleft=item5.style.pixelleft+20item5.filters.alpha.opacity=item5.filters.alpha.opacity+20timelinestart=timelinestart+1elsecleartimeout(tidone)end iftidone=settimeout("init()",1)end functionfunction outit()if timelinestart<>0 thencleartimeout(tidone)item1.style.pixelleft=item1.style.pixelleft-20item1.filters.alpha.opacity=item1.filters.alpha.opacity-20item2.style.pixelleft=item2.style.pixelleft+20item2.filters.alpha.opacity=item2.filters.alpha.opacity-20item3.style.pixelleft=item3.style.pixelleft-20item3.filters.alpha.opacity=item3.filters.alpha.opacity-20item4.style.pixelleft=item4.style.pixelleft+20item4.filters.alpha.opacity=item4.filters.alpha.opacity-20item5.style.pixelleft=item5.style.pixelleft-20item5.filters.alpha.opacity=item5.filters.alpha.opacity-20timelinestart=timelinestart-1elsecleartimeout(tidtwo)plane.style.display="none"exit functionend iftidtwo=settimeout("outit()",1)end function</script>

 

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.