热搜:6KBBS6kbbs V8.0 官方论坛
当前位置: 6kbbs V8.0 官方论坛 » 链接交换 » 可展开收缩特效
帖子状态  
本帖子共有 1048 位阅读者, 0 个回复.
  • 回复
1条记录

wl160

幼儿园
帖子
金钱
魅力
威望
注册
2011-09-16 
wl160 发表于 2012-05-14 13:56   
可展开收缩特效
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />


  6. </head>
  7. <body>
  8. <script type="text/javascript" language="javascript">
  9. var time = 500;
  10. var h = 0;
  11. function addCount()
  12. {
  13. if(time>0)
  14. {
  15. time--;
  16. h = h+5;
  17. }
  18. else
  19. {
  20. return;
  21. }
  22. if(h>50) //高度
  23. {
  24. return;
  25. }
  26. document.getElementById("ads").style.display = "";
  27. document.getElementById("ads").style.height = h+"px";
  28. setTimeout("addCount()",30);
  29. }

  30. window.onload = function showAds()
  31. {
  32. addCount();
  33. setTimeout("noneAds()",10000); //停留时间自己适当调整
  34. }
  35. </script>

  36. <script type="text/javascript" language="javascript">
  37. var T = 50;
  38. var N = 50; //高度
  39. function noneAds()
  40. {
  41. if(T>0)
  42. {
  43. T--;
  44. N = N-5;
  45. }
  46. else
  47. {
  48. return;
  49. }
  50. if(N<0)
  51. {
  52. document.getElementById("ads").style.display = "none";
  53. return;
  54. }

  55. document.getElementById("ads").style.height = N+"px";
  56. setTimeout("noneAds()",30);
  57. }
  58. </script>
  59. <div id="ads" style="margin:auto; display:none; width:950px; border:solid 1px #000; background-color:#800000; overflow:hidden; text-align:left; font-size:18px; color:#ffff00;">
  60. 通知:www.trust19.cn。
  61. </div>

  62. </body>
  63. </html>
  • 回复
1条记录