下拉透明菜单一部分

下拉透明菜单

<script language="JavaScript">
var mmenus    = new Array();
var misShow   = new Boolean();
misShow=false;
var misdown   = new Boolean();
misdown=false;
var mnumberofsub=0;
var musestatus=false;
var mpopTimer = 0;
mmenucolor='#89CB10';mfontcolor='MenuText';mmenuoutcolor='#ADEF34';mmenuincolor='#B5E74E';mmenuoutbordercolor='#ECFA3A';mmenuinbordercolor='#5A2614';mmidoutcolor='#A9DA1D';mmidincolor='#799310';mmenuovercolor='#004080';mitemedge='0';msubedge='1';mmenuunitwidth=66;mmenuitemwidth=140;mmenuheight=25;mmenuwidth='100%';mmenuadjust=0;mmenuadjustV=0;mfonts='font-family: 宋体; font-size: 9pt; color: MenuText; ';mcursor='hand';
var swipeSteps = 4;
var swipemsec = 25;
var swipeArray = new Array();
function swipe(el, dir, steps, msec) {
 if (steps == null) steps = swipeSteps;
 if (msec == null) msec = swipemsec;
 if (el.swipeIndex == null)
  el.swipeIndex = swipeArray.length;
 if (el.swipeTimer != null)
  window.clearTimeout(el.swipeTimer);
 swipeArray[el.swipeIndex] = el;
 el.style.clip = "rect(-99999, 99999, 99999, -99999)";
 if (el.swipeCounter == null || el.swipeCounter == 0) {
  el.orgLeft  = el.offsetLeft;
  el.orgTop  = el.offsetTop;
  el.orgWidth = el.offsetWidth;
  el.orgHeight  = el.offsetHeight;
 }
 el.swipeCounter = steps;
 el.style.clip = "rect(0,0,0,0)";
 window.setTimeout("repeat(" + dir + "," + el.swipeIndex + "," + steps + "," + msec + ")", msec);
}
function repeat(dir, index, steps, msec) {
 el = swipeArray[index];
 var left   = el.orgLeft;
 var top    = el.orgTop;
 var width  = el.orgWidth;
 var height = el.orgHeight;
 if (el.swipeCounter == 0) {
  el.style.clip = "rect(-99999, 99999, 99999, -99999)";
  return;
 }
 else {
  el.swipeCounter--;
  el.style.visibility = "visible";
  switch (dir) {
   case 2:
    el.style.clip = "rect(" + height*el.swipeCounter/steps + "," + width + "," + height + "," + 0 + ")";
    el.style.top  = top - height*el.swipeCounter/steps;
    break;
   case 8:
    el.style.clip = "rect(" + 0 + "," + width + "," + height*(steps-el.swipeCounter)/steps + "," + 0 + ")";
    el.style.top  = top + height*el.swipeCounter/steps;
    break;
   case 6:
    el.style.clip = "rect(" + 0 + "," + width + "," + height + "," + width*(el.swipeCounter)/steps + ")";
    el.style.left  = left - width*el.swipeCounter/steps;
    break;
   case 4:
    el.style.clip = "rect(" + 0 + "," + width*(swipeSteps - el.swipeCounter)/steps + "," + height + "," + 0 + ")";
    el.style.left  = left + width*el.swipeCounter/steps;
    break;
  }
 
  el.swipeTimer = window.setTimeout("repeat(" + dir + "," + index + "," + steps + "," + msec + ")", msec);
 }
}
var mtmpleft="";
var mtmptop="";
function hideSwipe(el) {
 window.clearTimeout(el.swipeTimer);
 el.style.visibility = "hidden";
 el.style.clip = "rect(-99999, 99999, 99999, -99999)";
 el.swipeCounter = 0;
 if(mtmpleft!="")el.style.left = mtmpleft;
 if(mtmptop!="")el.style.top = mtmptop;
}

function stoperror(){
return true;
}
window.onerror=stoperror;
function mpopOut() {
mpopTimer = setTimeout('mallhide()', 500);
}
function getReal(el, type, value) {
 temp = el;
 while ((temp != null) && (temp.tagName != "BODY")) {
  if (eval("temp." + type) == value) {
   el = temp;
   return el;
  }
  temp = temp.parentElement;
 }
 return el;
}

function mMenuRegister(menu)
{
  mmenus[mmenus.length] = menu
  return (mmenus.length - 1)
}

function mMenuItem(caption,command,target,isline,statustxt,level,img,sizex,sizey,pos){
 this.items = new Array();
 this.caption=caption;
 this.command=command;
 this.target=target;
 this.isline=isline;
 this.statustxt=statustxt;
 if(level!=null){mnumberofsub++;
 this.hasc=mnumberofsub;}
 this.level=level;
 this.img=img;
 this.sizex=sizex;
 this.sizey=sizey;
 this.pos=pos;
}

时间: 2024-11-08 20:54:28

下拉透明菜单一部分的相关文章

下拉透明菜单

菜单|透明|下拉 下拉透明菜单 <script language="JavaScript">var mmenus    = new Array();var misShow   = new Boolean(); misShow=false;var misdown   = new Boolean();misdown=false;var mnumberofsub=0;var musestatus=false;var mpopTimer = 0;mmenucolor='#89CB1

JS特效代码--下拉透明菜单

 <script language="JavaScript"> var mmenus = new Array(); var misShow = new Boolean();  misShow=false; var misdown = new Boolean(); misdown=false; var mnumberofsub=0; var musestatus=false; var mpopTimer = 0; mmenucolor='#89CB10';mfontcolor

下拉透明菜单四

mpmenu1=new mMenu('网站首页','/','self','','','',''); mpmenu1.addItem(new mMenuItem(' 用户注册','/register.asp','self',false,'用户注册',null,'','','','')); mpmenu1.addItem(new mMenuItem(' 用户登录','/login.asp','self',false,'用户登录',null,'','','','')); mpmenu1.addItem

下拉透明菜单三

function mwritetodocument(){       var mwb=1;                      var stringx='<div id="mposflag" style="position:absolute;"></div><table  id=mmenutable border=0 cellpadding=3 cellspacing=2 width='+mmenuwidth+' height='

下拉透明菜单二

function mMenu(caption,command,target,img,sizex,sizey,pos){  this.items = new Array();  this.caption=caption;  this.command=command;  this.target=target;  this.img=img;  this.sizex=sizex;  this.sizey=sizey;  this.pos=pos;  this.id=mMenuRegister(this)

iOS实现顶部标签式导航栏及下拉分类菜单_IOS

本文实例为大家分享了iOS实现顶部标签式导航栏及下拉分类菜单的全部过程,供大家参考,具体内容如下 当内容及分类较多时,往往采用顶部标签式导航栏,例如网易新闻客户端的顶部分类导航,最近刚好有这样的应用场景,参考网络上一些demo,实现了这种导航效果,记录一些要点. 效果图(由于视频转GIF掉帧,滑动和下拉动画显得比较生硬,刚发现quickTime可以直接录制手机视频,推荐一下,很方便) 1.顶部标签式导航栏 (1)实现思路 其实就是在上下两个UIScrollView上做文章,实现联动选择切换的效果

只用CSS做的下拉式菜单--A Drop-Down Menu With Only CSS

最近在网上发现了一个只用CSS实现的下拉式菜单(Drop-Down Menu),感觉很新鲜也很酷.于是仔细看了作者的介绍以及源代码,发现核心就是一个":hover"伪类的使用.在CSS1中此伪类仅可用于a对象.且 对于无href属性(特性)的a对象,此伪类不发生作用.在CSS2中此伪类可以应用于任何对象.但IE6及其以下版本都不能很好的支持CSS2,因此 IE6及其以下版本就不能很好的运行这个程序了.所幸Firefox,Netscape,Opera,Safari等浏览器的最新版本均能很

DIV下拉式菜单(一)

菜单|下拉 script> var cm=null; document.onclick = new Function("show(null)") function getPos(el,sProp) { var iPos = 0 while (el!=null) { iPos+=el["offset" + sProp] el = el.offsetParent } return iPos } function show(el,m) { if (m) { m.st

用好表单的下拉式菜单

菜单|下拉 用<select>标记可以在表单中方便地插入一个下拉式菜单,以方便用户进行选择,这在制作调查表或用户订单时非常有用,对这种下拉式菜单稍加改造则可以制作出名符其实的下拉式导航菜单. 一.下拉式选择框 这两个示例,外观形式有所不同,但都是用了<select>和<option>标记做出来的,只是设置了不同的参数而已.比较一下它们的源代码,就明白了: 左边的菜单源代码:<select name="select" size="4&q