Chinaunix首页 | 论坛 | 博客
  • 博客访问: 76508
  • 博文数量: 73
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 740
  • 用 户 组: 普通用户
  • 注册时间: 2014-07-04 16:50
文章分类
文章存档

2014年(73)

我的朋友

分类: Html/Css

2014-09-12 09:51:21


点击(此处)折叠或打开

  1. <head>
  2. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  3. <title></title>
  4. <style type="text/css">

  5. </style>
  6. <script type="text/javascript">
  7. lastNo=0
  8. function re(menu_no){
  9. if(lastNo!=menu_no){
  10. cur=menu_no+1
  11. lastNo=menu_no
  12. rest()
  13. }else{
  14. cur=100
  15. }
  16. document.getElementById("board"+menu_no).style.visibility="visible"
  17. }
  18. function rest(){
  19. for(i=1;i<=4;i++){
  20. document.getElementById("hor"+i).style.top=20*i;
  21. document.getElementById("board"+i).style.visibility="hidden"
  22. }
  23. menu_num=4;
  24. act=1
  25. height=120+20
  26. speed=0;
  27. posY=0;
  28. }
  29. function huke(){
  30. if(act==1&&cur<100){
  31. speed=(height-posY)*0.69+speed*0.6
  32. posY+=speed
  33. for(i=cur;i<=menu_num;i++){
  34. document.getElementById("hor"+i).style.top=posY+(i-2)*20
  35. }
  36. if(Math.abs(height-posY)<0.5){
  37. for(i=cur;i<=menu_num;i++){
  38. document.getElementById("hor"+i).style.top=height+(i-2)*20
  39. }
  40. act=0
  41. }
  42. setTimeout("huke()",50)
  43. }
  44. }
  45. </script>
  46. </head>
  47. <body>
  48. <div id="hor1" onclick="re(1);huke()">中国站长站</div>
  49. <div id="hor2" onclick="re(2);huke()">Populor</div>
  50. <div id="hor3" onclick="re(3);huke()">Sports</div>
  51. <div id="hor4" onclick="re(4);huke()">Woman</div>
  52. <div id="board1"><a href="" target="_blank">http://www.chinaz.com</a></div>
  53. <div id="board2"><a href="" target="_blank">http://www.chinaz.com</a></div>
  54. <div id="board3">1.程序员与小姐的10个相同。<br />2.中国的程序员与中国的足球?</div>
  55. <div id="board4">1.二十一世纪最缺的是什么?人才<br />
  56. <a href="" target="_blank">http://www.chinaz.com</a>
  57. <a href="" target="_blank">http://www.chinaz.com</a></div>
  58. </body>

阅读(326) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~