|
|
|
页面导航会动的菜单 |
热 ★★★★ |
|
页面导航会动的菜单 |
|
作者:闵涛 文章来源:闵涛的学习笔记 点击数:593 更新时间:2009/4/23 11:15:15 |
|
说明: 会动的菜单
效果: 运行后查看!
代码: 要完成此效果把如下代码加入到<body>区域中。
<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>
<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><p><div id="Layer1" style="position:absolute;
width:200px; height:115px; z-index:1">
没有相关教程
|
|
教程录入:mintao 责任编辑:mintao |
|
|
上一篇教程: 页面导航非常简单的导航“菜块”呵 下一篇教程: 页面导航可与IE整合、分离的导航条 |
|
|
【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网] |
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
|
|
|
|
|
|
|
同类栏目 |
|
|
赞助链接 |
|
|
500 - 内部服务器错误。
|
|
|
|
|
|