爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
可以拖动的显隐导航菜单
可以拖动的显隐导航菜单
日期:2014-05-18 浏览次数:20163 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>爱易网网页特效演示,可以拖动的显隐导航菜单</title> <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> </head> <body onmousemove="move()"> <div style="position:absolute; left: 100; top: 100; width: 1; height: 1;cursor: hand" 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:move"onmouseover='stopTimerline();menuItemIn()' onmouseout='runTimerline()' class="none">可拖动的菜单</div> <div align=center id="item11" style="position:absolute; left:50px; top:55px; width:99px; height:19px; z-index:2; filter:alpha(opacity=0)" onmouseover="this.className='over';stopTimerline()" onmouseout="this.className='none';runTimerline()" class="none" >菜单项一</div> <div align=center id="item12" style="position:absolute; left:250px; top:77px; width:99px; height:19px; z-index:3;filter:alpha(opacity=0)" class=none onmouseover="this.className='over';stopTimerline()" onmouseout="this.className='none';runTimerline()">菜单项二</div> <div align=center id="item13" style="position:absolute; left:50px; top:99px; width:99px; height:19px; z-index:4; filter:alpha(opacity=0)" class=none onmouseover="this.className='over';stopTimerline()" onmouseout="this.className='none';runTimerline()">菜单项三</div> <div align=center id="item14" style="position:absolute; left:250px; top:121px; width:99px; height:19px; z-index:5;filter:alpha(opacity=0)" class=none onmouseover="this.className='over';stopTimerline()" onmouseout="this.className='none';runTimerline()">菜单项四</div> <div align=center id="item15" style="position:absolute; left:50px; top:143px; width:99px; height:19px; z-index:6; filter:alpha(opacity=0)" class=none onmouseover="this.className='over';stopTimerline()" onmouseout="this.className='none';runTimerline()">菜单项五</div> </div><script> //动画菜单 var currTimerlinePoint=0 var totalTimerlineFrames=2 var timerlineTimer var leftLine = 50 var timerIn var timerOut var timerlineArray = new Array() timerlineArray[0]='' timerlineArray[1]='menuItemOut()' function runTimerline() { window.timerlineTimer = setTimeout('menuItemOut()',500) } function stopTimerline() { clearTimeout(window.timerlineTimer) } function menuItemIn() { if( leftLine != 150) { item11.style.pixelLeft += 20; item11.filters.alpha.opacity += 20 item12.style.pixelLeft -= 20; item12.filters.alpha.opacity += 20 item13.style.pixelLeft += 20; item13.filters.alpha.opacity += 20 item14.style.pixelLeft -= 20; item14.filters.alpha.opacity += 20 item15.style.pixelLeft += 20; item15.filters.alpha.opacity += 20 leftLine += 20 } else { clearTimeout(window.timerIn) return false } timerIn=window.setTimeout('menuItemIn()',1) } function menuItemOut() { clearTimeout(window.timerIn) if (leftLine != 50) { item11.style.pixelLeft -= 20; item11.filters.alpha.opacity -= 20 item12.style.pixelLeft += 20; item12.filters.alpha.opacity -= 20 item13.style.pixelLeft -= 20; item13.filters.alpha.opacity -= 20 item14.style.pixelLeft += 20; item14.filters.alpha.opacity -= 20 item15.style.pixelLeft -= 20; item15.filters.alpha.opacity -= 20 leftLine -= 20 } else { clearTimeout(window.timerOut) return false; } timerOut=window.setTimeout("menuItemOut()",1) } //移动层 var over=false,down=false,divleft,divtop;function
上一篇:文件夹式的菜单
下一篇:推拉门式样的菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
湖南卫视扶持芒果TV杀入媒体:版权独播不分销
魅族黄章惹怒芙蓉姐姐 将跨界推女神手机
网易云音乐能否为丁磊拿到移动互联网门票?
同为70前后人,马云为什么总是像外星人那么瘦
火一把就死: 百度魔图验证社交游戏衰亡宿命
HTC曝出特大丑闻:高管诈骗+商业间谍
雷军会做赔钱生意?迅雷跌破发行价 市值仅7亿美元
传4G牌照国庆节前后发放 TD-LTE制式优先
估值增长9.8% 阿里IPO前市值达2450亿美元
推荐阅读
更多>
富士康人事故骚动方寸 不惜血本下注电商
苹果6月20日发布iPhone5S 触摸屏概念股生动
iPhone 6 Plus要召回是谣言
金山毒霸安全中心: XP退役后首个高危漏洞来了
黑莓高管:黑莓能作为家“小众公司”活下来
公信力消失:马航事件社交媒体传播之痛
苹果MacBook Air劣势渐显 或推新产品改变命运
中移动本月推手机钱包 iPhone遭边缘化
联想架构调整后:Think品牌或推智能手机
唯品会荣登“最贵中概股”的欢喜与哀愁
国美苏宁线上首度正面PK 京东列席4月电商战
亚马逊第三方平台真的卖盗版书?
解读苹果收购Beats背后动机:库克在想什么?
微软张亚勤趋势判断:未来三十年属于物理化互联网
Android应用审核乱象:诈骗软件冲上排行榜首
想玩P2P?几个您必须知道的潜规则
惠普董事长莱恩辞职 为巨额财务减记埋单
历史惊人相似:如今的库克 曾经的鲍尔默
中国电信内外受困 去电信化思绪待改
薛蛮子取保后首次发微博表示:辜负你们了