爱易网
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 浏览次数:20233 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<style type="text/css"> .anylinkcss{ position:absolute; visibility: hidden; border:1px solid black; border-bottom-width: 0; font:normal 12px Verdana; line-height: 18px; z-index: 100; background-color: #E9FECB; width: 205px; } .anylinkcss a{ width: 100%; display: block; text-indent: 3px; border-bottom: 1px solid black; padding: 1px 0; text-decoration: none; font-weight: bold; text-indent: 5px; } .anylinkcss a:hover{ /*hover background color*/ background-color: black; color: white; } </style> <script language="javascript"> //more javascript from http://www.aiyiweb.com var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds) var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d) var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no) /////No further editting needed var ie5=document.all var ns6=document.getElementById&&!document.all function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function showhide(obj, e, visible, hidden){ if (ie5||ns6) dropmenuobj.style.left=dropmenuobj.style.top=-500 if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") obj.visibility=visible else if (e.type=="click") obj.visibility=hidden } function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function clearbrowseredge(obj, whichedge){ var edgeoffset=0 if (whichedge=="rightedge"){ var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 dropmenuobj.contentmeasure=dropmenuobj.offsetWidth if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth } else{ var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 dropmenuobj.contentmeasure=dropmenuobj.offsetHeight if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight } return edgeoffset } function dropdownmenu(obj, e, dropmenuID){ if (window.event) event.cancelBubble=true else if (e.stopPropagation) e.stopPropagation() if (typeof dropmenuobj!="undefined") //hide previous menu dropmenuobj.style.visibility="hidden" clearhidemenu() if (ie5||ns6){ obj.onmouseout=delayhidemenu dropmenuobj=document.getElementById(dropmenuID) if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'} dropmenuobj.onmouseover=clearhidemenu dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)} showhide(dropmenuobj.style, e, "visible", "hidden") dropmenuobj.x=getposOffset(obj, "left") dropmenuobj.y=getposOffset(obj, "top") dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px" dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px" } return clickreturnvalue() } function clickreturnvalue(){ if ((ie5||ns6) && !enableanchorlink) return false else return true } function contains_ns6(a, b) { while (b.parentNode) if ((b = b.parentNode) == a) return true; return false; } function dynamichide(e){ if (ie5&&!dropmenuobj.contains(e.toElement)) delayhidemenu() else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) delayhidemenu() } function delayhidemenu(){ delayhi
上一篇:狡猾的按钮特效
下一篇:一种提示菜单的特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
眼球识别技术EyeVerify融资600万美元 360参投
苹果大中华区业绩回暖 中移动贡献或低于预期
首家国有独资P2P平台上线 或预示政策日渐明朗
工商下月将整治手机市场
网易云音乐能否为丁磊拿到移动互联网门票?
众贷网满月开张 网络金融监管再受质疑
马云寄厚望于物流 “菜鸟”行情暂难持续
三问刘强东:京东为何近来火气这么大?
团购网站存活率仅18.6% 剩余缺乏千家
推荐阅读
更多>
电信运营商员工涌入虚拟运营商,待遇差距多大?
美剧讲硅谷创业者:远不及现实荒诞?
黑狐病毒疯传播 电脑管家首推 专杀工具
淘宝公布新规:升级售假卖家惩罚力度
猎豹移动上市押海外市场 与小米有合作空间
湖南卫视扶持芒果TV杀入媒体:版权独播不分销
亚马逊宣布新春大促策略 欲打造另一个"黑五"
华为坚持不上市究竟为何?不差钱也不想冒风险
亚马逊Fire Phone:请别拿我跟苹果三星比
戴尔正告继续上市存风险 称黑石伊坎方案有缺乏
微软谷歌高层访韩面前:忌惮三星的崛起
微软史上最大规模裁员,一半诺基亚员工
中移动本月推手机钱包 iPhone遭边缘化
Google要求硬件厂商捆绑预装应用的协议曝光
可靠消息称微型针孔偷拍设备拟全面禁止
苹果已经允许开发者提交64位应用程序
小米2S试水高端化 纯“性价比”玩法已成过去式
FDD牌照短期不会发放 联通电信暗自提速建网
云智慧:用大数据实现企业应用性能管理
170号码扎堆上市:手机话费私人定制时代到来?