鼠标右键显隐效果

drac1987

drac1987

2016-01-29 11:50

鼠标右键显隐效果,鼠标右键显隐效果

把如下代码加入<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

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com)

</div
<script language="vbs"
dim down,divleft,divtop,timelinestart,timelinestop,tidone,tidtwo,tidtree
down=false
timelinestart=0
timelinestop=0
sub document_onmousedown
if window.event.button=2 then
plane.style.display=""
plane.style.left=window.event.clientx-153
plane.style.top=window.event.clienty-35
end if
end sub
sub document_onmousemove
if down then
plane.style.left=window.event.clientx-divleft
plane.style.top=window.event.clienty-divtop
end if

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com)

end sub
sub document_ondargstart
window.event.returnvalue=false
end sub
function menuin()
cleartimeout(tidtree)
end function
sub document_onclick
tidtree=settimeout("outit()",200)
end sub
function init()
if timelinestart<5 then
cleartimeout(tidtwo)
item1.style.pixelLeft=item1.style.pixelLeft+20
item1.filters.alpha.opacity=item1.filters.alpha.opacity+20
item2.style.pixelLeft=item2.style.pixelLeft-20
item2.filters.alpha.opacity=item2.filters.alpha.opacity+20
item3.style.pixelLeft=item3.style.pixelLeft+20
item3.filters.alpha.opacity=item3.filters.alpha.opacity+20
item4.style.pixelLeft=item4.style.pixelLeft-20
item4.filters.alpha.opacity=item4.filters.alpha.opacity+20
item5.style.pixelLeft=item5.style.pixelLeft+20
item5.filters.alpha.opacity=item5.filters.alpha.opacity+20
timelinestart=timelinestart+1
else
cleartimeout(tidone)
end if
tidone=settimeout("init()",1)
end function
function outit()
if timelinestart<0 then
cleartimeout(tidone)
item1.style.pixelLeft=item1.style.pixelLeft-20
item1.filters.alpha.opacity=item1.filters.alpha.opacity-20
item2.style.pixelLeft=item2.style.pixelLeft+20
item2.filters.alpha.opacity=item2.filters.alpha.opacity-20
item3.style.pixelLeft=item3.style.pixelLeft-20
item3.filters.alpha.opacity=item3.filters.alpha.opacity-20
item4.style.pixelLeft=item

展开更多 50%)
分享

猜你喜欢

鼠标右键显隐效果

电脑网络
鼠标右键显隐效果

JavaScript 屏蔽鼠标右键

Web开发
JavaScript 屏蔽鼠标右键

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

鼠标右键失灵原因? 鼠标右键突然失灵原因分析与解决办法

电脑入门
鼠标右键失灵原因? 鼠标右键突然失灵原因分析与解决办法

360游览器如何屏蔽右键鼠标手势

浏览器
360游览器如何屏蔽右键鼠标手势

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

鼠标的右键不能使用怎么办

计算机应用技术
鼠标的右键不能使用怎么办

windows中将绿色程序添加到鼠标右键

电脑入门
windows中将绿色程序添加到鼠标右键

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

《讨鬼传 极》关于锁镰无限天岩户配魂方法介绍

《讨鬼传 极》关于锁镰无限天岩户配魂方法介绍

扩展COleDropTarget类来支持任意窗口拖放 - 作者:王加宝

扩展COleDropTarget类来支持任意窗口拖放 - 作者:王加宝
下拉加载更多内容 ↓