中文(简体)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>修改Flash AS效果的导航菜单</title> <style type="text /css"> <!-- a:link,a:visited { 文本装饰:无;颜色:#666666 } a:hover { 文本装饰:下划线 } #hor1 { 位置:绝对;左:320px;顶部:20px;宽度:220px;高度:20px; z 索引:1;背景颜色:#999900; } #hor2 { 位置:绝对;左:320px;顶部:40px;宽度:220px;高度:20px; z 索引:2;背景颜色:#FFCC00; } #hor3 { 位置:绝对;左:320px;顶部:60 像素;宽度:220px;高度:20px; z 索引:3;背景颜色:#99CC00; } #board1 { 位置:绝对;左:320px;顶部:40px;宽度:220px;高度:120px; z 指数:-100;背景颜色:#333333;可见性:隐藏; } body,td,th { 字体系列:Verdana、Arial、Helvetica、sans-serif;字体大小:12px;颜色:#FFFFFF;字体粗细:粗体; } 正文 { 背景颜色:#666666; } #board2 { 位置:绝对;左:320px;顶部:60 像素;宽度:220px;高度:120px; z 指数:-90;背景颜色:#333333;可见性:隐藏; } #board3 { 位置:绝对;宽度:220px;高度:120px; z 指数:-80;左:320 像素;顶部:80 像素;背景颜色:#333333;可见性:隐藏; } #hor4 { 位置:绝对;左:320px;顶部:80px;宽度:220px;高度:20px; z 索引:4;背景颜色:#99CCCC; } #board4 { 位置:绝对;左:320px;顶部:100px;宽度:220px;高度:120px; z 指数:-70;背景颜色:#333333;可见性:隐藏; } --> </style> <script type="text/javascript">lastNo=0 函数 re(menu_no){ if(lastNo!=menu_no){ cur=menu_no+1 lastNo=menu_no 休息() }else{ cur =100 } document.getElementById("board"+menu_no).style.visibility="visible" } function rest(){ for(i=1;i<=4;i++){ document.getElementById("hor"+i ).style.top=20*i; document.getElementById("board"+i).style.visibility="hidden" } menu_num=4; act=1 高度=120+20 速度=0;位置Y=0; } function huke(){ if(act==1&&cur<100){ speed=(height-posY)*0.69+speed*0.6 posY+=speed for(i=cur;i<=menu_num;i++){ document.getElementById( "hor"+i).style.top=posY+(i-2)*20 } if(Math.abs(height-posY)<0.5){ for(i=cur;i<=menu_num;i++){ 文档. getElementById("hor"+i).style.top=height+(i-2)*20 } act=0 } setTimeout("huke()",50) } } </script> </head> <body> < div id="hor1" onclick="re(1);huke()">新闻</div> <div id="hor2" onclick="re(2);huke()">热门</div> < div id="hor3" onclick="re(3);huke()">运动</div> <div id="hor4" onclick="re(4);huke()">女性</div> < div id="board1">1.由AS而想起Javascript<br />2.用Jscript写ASP有没有先天性的不足?<br />3.没有了。</div> <div id="board2 ">1.xhtml+css真的来了吗?<br />2.Flash取代传统网站<br />3.Flash什么时候才能连接数据库?</div> <div id="board3">1. <br />2.中国的会计师与中国的足球?</div> <div id="board4">1.二十一世纪最缺的是什么?人才< br /> <a href="http://www.downcodes.com" target="_blank">www.downcodes.com</a></div> </body> </html>