爱易网
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特效
类似QQ的竖型目录菜单
类似QQ的竖型目录菜单
日期:2014-05-18 浏览次数:20325 次
以下是程序代码
<html> <head> <title>类似QQ的竖型目录菜单,aiyiweb整理收集。</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script language="JavaScript"> var titleHeight = 22; //标题的高度 var bodyHeight = 160; //菜单内容项的高度 var groupcount = 4; //组的个数 var step = 3; //移动速度 //显示菜单的内容 function showDiv(obj1, obj2) { //以下循环为改变标题的背景颜色 for(i=0;i<document.all.tags("td").length;i++) { if (document.all.tags("td")[i].className == 'headtd') document.all.tags("td")[i].bgColor = '#cccc66'; } obj2.bgColor = '#cccc66'; moveme(obj1); } //移动菜单内容 function moveme(obj) { idnumber = parseInt(obj.id.substr(4)); objtop = titleHeight * (idnumber - 1); objbuttom = bodyHeight + titleHeight * (idnumber - 2); currenttop = parseInt(obj.style.top); if (currenttop >= objbuttom) { //检验出每一个应该向上移动的层 countid = 1; for(i=0;i<document.all.tags("div").length;i++) { if (document.all.tags("div")[i].id == 'item'+countid+'body') { obj = document.all.tags("div")[i]; objtop = titleHeight * (countid - 1); moveup(obj,objtop); if (countid == idnumber) break; countid++; } } } else if ((currenttop <= objtop) && (idnumber < groupcount)) { //检验出每一个应该向下移动的层 idnumber++; countid = groupcount; for(i=document.all.tags("div").length-1;i>=0;i--) { if (document.all.tags("div")[i].id == 'item'+countid+'body') { obj = document.all.tags("div")[i]; objbuttom = bodyHeight + titleHeight * (countid - 2); movedown(obj,objbuttom); if (countid == idnumber) break; countid--; } } } } //向上移动的方法 function moveup(obj,objtop) { currenttop = parseInt(obj.style.top); if (currenttop > objtop) { obj.style.top = currenttop - step; window.setTimeout('moveup('+obj.id+','+objtop+')',1) } } //向下移动的方法 function movedown(obj,objbuttom) { currenttop = parseInt(obj.style.top); if (currenttop < objbuttom) { obj.style.top = currenttop + step; window.setTimeout('movedown('+obj.id+','+objbuttom+')',1) } } </script> <style type="text/css"> <!--showme .headtd { border: 3px outset; border-color: #00bbFF #0007cc #0007cc #00aacc; cursor: hand; font-size: 10pt} .bodytd { background: gray; border: 2px outset; border-color: #00aaFF #0007cc #0007cc #00aacc; font-size: 10pt} --> </style> </head> <body bgcolor="#FFFFFF" text="#000000"> 告诉你一个应有尽有的网页特效网址:<a href="http://js.aiyiweb.com">http://js.aiyiweb.com</a> <hr /> <div id="mainboard" style="position:absolute; left:2px; top:2px; width:120px; height:226px; z-index:3; overflow: hidden; background-color: #cccc66;"> <div id="item1body" style="position:absolute; left:0; top:0; width:120px; height:160px; z-index:1; overflow: hidden"> <table width="100%" border="0" height="100%" cellpadding="2" cellspacing="0"> <tr> <td id="item1head" height="20" class="headtd" onclick="showDiv(item1body,this)" bgcolor="#cccc66"> <div align="center">爱易网群1</div> </td> </tr> <tr> <td class="bodytd"> <div align="center"><a
上一篇:狡猾的按钮特效
下一篇:常用的隐藏式目录菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
云智慧:用大数据实现企业应用性能管理
O2O成"唐僧肉":百度糯米抢食第一口令阿里腾讯颤抖
三星石墨烯制备技术获突破
从WPS到office365,中国企业能否赶超美国?
途牛开盘价9美元 与发行价持平
广东移动高层受调查 中移动或现更大反腐风暴
任正非:华为决不上市 上市公司股东贪婪而短视
清点:罗永浩推锤子ROM 小米打法遭模拟
联通丹东公司一高管造假套出手机变卖被判刑7年
推荐阅读
更多>
杨元庆去年总薪酬1.33亿元
国美苏宁线上首度正面PK 京东列席4月电商战
工商下月将整治手机市场
窗口期:还有哪些互联网公司可能今年IPO?
神奇约炮应用被禁 改名后重返苹果应用商店
雅安地震救灾前线的科技之手 微弱而暖和
华为、小米和联想在中国手机市场上演“三国杀”
评论:阿里为什么不试着收购一家香港媒体呢
Android应用审核乱象:诈骗软件冲上排行榜首
传4G牌照国庆节前后发放 TD-LTE制式优先
金山毒霸安全中心: XP退役后首个高危漏洞来了
QQ空间与微信龟兔赛跑,商业生态链陷入死循环
团购网站存活率仅18.6% 剩余缺乏千家
“宽带中国”计划已正式上升为国家战略
568倍PE,“长跑者”亚马逊的高估值之谜
华为变阵:任正非调整三大业务布局
阿里马云:我觉得互联网还有十年可以做
扎克伯格华裔妻子首度亮相电视节目畅谈情史
蜗牛移动董事长石海:号卡被叫停属乌龙事件
高通拼抢国际芯片市场 联发科海外拓展难安心