zoukankan      html  css  js  c++  java
  • 移动的菜单

    要完成此效果把如下代码加入到<body>区域中

    <div id="point1" STYLE="position:absolute;visibility:visible;">
    <table width="120" border="1" bordercolor="#000000" cellspacing="0" cellpadding="4" bgcolor="#CCFFCC">
    <tr>
    <td align=center>
    <a href="http://free.alixixi.com/" target="_blank">
    <img src="http://www.alixixi.com/UploadPic/userface/no1323.jpg" border=0 alt="JavaScript Fairyland" width="88" height="31" onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/>
    </a>
    </td>
    </tr>
    <tr>
    <td align=center>
    <font size="2"><a href="#" target="_blank"><font color="#FF3399">LINK</font></a></font>
    </td>
    </tr>
    <tr>
    <td align=center>
    <font size="2"><a href="#" target="_blank"><font color="#FF3399">LINK</font></a></font>
    </td>
    </tr>
    <tr>
    <td align=center>
    <font size="2"><a href="#"><font color="#FF3399">LINK</font></a></font>
    </td>
    </tr>
    <tr>
    <td align=center>
    <font size="2"><a href="#"><font color="#FF3399">LINK</font></a></font>
    </td>
    </tr>
    <tr>
    <td align=center>
    <font size="2"><a href="#"><font color="#FF3399">LINK</font></a></font>
    </td>
    </tr>
    </table>
    </div>


    <script LANGUAGE="JavaScript1.2">
    var XX=10;
    var xstep=1;
    var delay_time=30;

    var YY=0;
    var ch=0;
    var oh=0;
    var yon=0;

    var ns4=document.layers?1:0
    var ie=document.all?1:0
    var ns6=document.getElementById&&!document.all?1:0

    if(ie){
    YY=document.body.clientHeight;
    point1.style.top=YY;
    }
    else if (ns4){
    YY=window.innerHeight;
    document.point1.pageY=YY;
    document.point1.visibility="hidden";
    }
    else if (ns6){
    YY=window.innerHeight
    document.getElementById('point1').style.top=YY
    }


    function reloc1()
    {

    if(yon==0){YY=YY-xstep;}
    else{YY=YY+xstep;}
    if (ie){
    ch=document.body.clientHeight;
    oh=point1.offsetHeight;
    }
    else if (ns4){
    ch=window.innerHeight;
    oh=document.point1.clip.height;
    }
    else if (ns6){
    ch=window.innerHeight
    oh=document.getElementById("point1").offsetHeight
    }

    if(YY<0){yon=1;YY=0;}
    if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
    if(ie){
    point1.style.left=XX;
    point1.style.top=YY+document.body.scrollTop;
    }
    else if (ns4){
    document.point1.pageX=XX;
    document.point1.pageY=YY+window.pageYOffset;
    }
    else if (ns6){
    document.getElementById("point1").style.left=XX
    document.getElementById("point1").style.top=YY+window.pageYOffset
    }

    }

    function onad()
    {
    if(ns4)
    document.point1.visibility="visible";
    loopfunc();
    }
    function loopfunc()
    {
    reloc1();
    setTimeout('loopfunc()',delay_time);
    }

    if (ie||ns4||ns6)
    window.onload=onad
    </script>


    <a href="http://www.alixixi.com/Dev/HTML/jsrun/">欢迎访问阿里西西网页特效集</a>

  • 相关阅读:
    12C 中,发生脑裂时,节点保留策略
    如何修改集群的公网信息(包括 VIP)
    从 ASH 找到消耗 PGA 和 临时表空间 较多的 Top SQL_ID
    Oracle SCN详解
    10046 trace
    使用trace文件定位ORA-00060问题
    (转)计算机漏洞安全相关的概念POC 、EXP 、VUL 、CVE 、0DAY
    PowerShell 相关常用命令(update...)
    (转)主从同步常遇见问题处理-线上MYSQL同步报错故障处理总结
    pentestbox 安装后的基本设置
  • 原文地址:https://www.cnblogs.com/skyay/p/3826198.html
Copyright © 2011-2022 走看看