ENGLISH 意见建议 网站地图 网站帮助
广泛智力汇聚   高效成果传播   先进机制培育
联盟首页  |  协同开发  |  开放源码库  |  安全告警  |  开源导航  |  文档中心  |  服务支持  |  共创论坛  |  关于联盟


注册会员 网站帮助
    您的位置 »
    今天是: 2010年11月22日    
项目搜索

完全匹配   
开源软件
软件分类表
新发布软件
其它网站镜像
代码片断
协同开发
文档
论坛
寻求协助
热点项目
站点状态
编译工厂

联系我们
关于联盟

代码片段库:
查看代码片段

浏览 | 提交新的代码片段 | 创建代码包

超酷导航层

类型:
Full Script
类别:
HTML Manipulation
许可证:
GNU General Public License
语言:
JavaScript
 
描述:
非常有动感谢的超级导航层,如果用的好,会有意想不到的效果 来源:http://www.baron.com.cn/javascript/index2.asp?page=6

该代码片段的版本系列:

片段ID 下载版本 提交时间 提交人 删除
48101.02003-10-25 17:03cbd001

点击"下载版本"来下载该代码片段.


最新版本的代码片段: 1.0


脚本说明:
把如下代码加入<body>区域中
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
 var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
 var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; 
 if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
 if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
 var xx=(parseInt(d.left))?parseInt(d.left):0;
 var yy=(parseInt(d.top))?parseInt(d.top):0;
 if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
 else if (c==2) {m=false;clearTimeout(g.p7Magic);}
 else {var i=parseInt(a);
  if (eval(g.moved)){clearTimeout(g.p7Magic);}
  if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
  if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
  if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
  if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
 if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
    xx+="px";yy+="px";}
  d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
  }else {g.moved=false;}
}
//-->
</script>
<style type="text/css">
<!--
.t {  filter: Alpha(Opacity=50)}
td {  font-size: 12px; line-height: 22px}
a:link {  color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
a:visited {  color: #FFFFFF; text-decoration: none; height: 20px; width: 63px; border-color: #33CCFF #30CCFF #30CCFF; background-color: #0099FF; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
a:hover {  background-color: #FF66FF; height: 20px; width: 61px; border: #FFFFFF; border-style: dotted; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
-->
</style>
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1">
  <div id="Layer2" style="position:absolute; left:264px; top:59px; width:67px; height:52px; z-index:2; background-color: #0068FF; layer-background-color: #0068FF; border: 1px none #000000; visibility: visible" class="t"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
      <tr> 
        <td align="center" valign="top"><font color="#FFFFFF" onMouseOver="P7AniMagic('Layer2',210,35,5,30,0,0)" onMouseOut="P7AniMagic('Layer2',264,59,5,30,0,0)">on 
          1<br>
          <a href="#;">第一項</a><br>
          <a href="#;">第二項</a><br>
          <a href="#;">第三項</a><br>
          </font></td>
      </tr>
    </table>
  </div>
  <div id="Layer3" style="position:absolute; left:264px; top:81px; width:66px; height:84px; z-index:3; background-color: #0066FF; layer-background-color: #0066FF; border: 1px none #000000; visibility: visible" class="t"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td>
          <div align="center"><font color="#FFFFFF" onMouseOver="P7AniMagic('Layer3',210,55,5,30,0,0)" onMouseOut="P7AniMagic('Layer3',264,81,5,30,0,0)">on 2<br>
            <a href="#;">第一項</a><br>
            <a href="#;">第二項</a><br>
            <a href="#;">第三項</a><br>
            </font></div>
        </td>
      </tr>
    </table>
  </div>
  <div id="Layer4" style="position:absolute; width:68px; height:80px; z-index:4; left: 264px; top: 102px; background-color: #0064FF; layer-background-color: #0064FF; border: 1px none #000000; visibility: visible" class="t"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td>
          <div align="center"><font color="#FFFFFF" onMouseOver="P7AniMagic('Layer4',210,75,5,30,0,0)" onMouseOut="P7AniMagic('Layer4',264,102,5,30,0,0)">on 3<br>
            <a href="#;">第一項</a><br>
            <a href="#;">第二項</a><br>
            <a href="#;">第三項</a><br>
            </font></div>
        </td>
      </tr>
    </table>
  </div>  <div id="Layer5" style="position:absolute; width:65px; height:127px; z-index:5; left: 265px; top: 56px"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0" height="72">
      <tr> 
        <td height="24" onMouseOver="P7AniMagic('Layer2',210,35,5,30,0,0)" onMouseOut="P7AniMagic('Layer2',264,59,5,30,0,0)">    </td>
      </tr>
      <tr>
        <td height="24" onMouseOver="P7AniMagic('Layer3',210,55,5,30,0,0)" onMouseOut="P7AniMagic('Layer3',264,81,5,30,0,0)">    </td>
      </tr>
      <tr>
        <td height="24" onMouseOver="P7AniMagic('Layer4',210,75,5,30,0,0)" onMouseOut="P7AniMagic('Layer4',264,102,5,30,0,0)">    </td>
      </tr>
    </table>
  </div>
</div>


		

提交新版本

如果您修改了一个代码片段并且觉得很应该让别人共享,您可以把这作为这个代码片段的最新版本提交上来.


联盟团体会员
合作伙伴
© 共创软件联盟 版权所有
联盟服务条款 | 联盟隐私权规则 | 联系我们
电话: (8610)68313388-5949 | 传真: (8610)88377936
京ICP备05056057号