TShopping

 找回密碼
 註冊
搜索
查看: 1678|回復: 1

[分享] 星點圍繞

[複製鏈接]
發表於 2008-10-7 20:06:44 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
  1. <!--星點圍繞_開始-->
  2. <script language="javascript">
  3. <!--
  4. if (document.all){
  5. colours=new Array('ff0000','00ff00','3366ff','ff00ff','ffa500','ffffff','fff000')
  6. amount=colours.length;
  7. YgetDelay=0,XgetDelay=0,Ydelay=0,Xdelay=0,step=0.2,currStep=0,my=0,mx=0;
  8. document.write('<div id="ie" style="position:absolute;top:0;left:0;"><div style="position:relative">');
  9. for (i=0; i < amount; i++)
  10. document.write('<div id="iestars" style="position:absolute;top:0px;left:0px;height:50px;width:50px;font-family:Courier New;font-size:5px;color:'+colours+';padding-top:20px;text-align:center">.</div>');
  11. document.write('</div></div>');
  12. ini=1;
  13. gstep=1;
  14. function iMouse(){
  15. my=event.y;mx=event.x;
  16. }
  17. document.onmousemove=iMouse
  18. function dim(){
  19. ini-=gstep;
  20. dt=setTimeout('dim()',10);
  21. if (ini < 2){
  22. clearTimeout(dt);
  23. glow();
  24. }
  25. }
  26. function glow(){
  27. ini+=gstep;
  28. gt=setTimeout('glow()',10);
  29. if (ini > 14){
  30. clearTimeout(gt);
  31. dim();
  32. }
  33. }
  34. function stars(){
  35. ie.style.top=document.body.scrollTop;
  36. for (i=0; i < amount; i++)
  37. {
  38. var layer=iestars.style;
  39. layer.filter='glow(color='+colours+', strength='+ini+')';
  40. layer.top= Ydelay+100*Math.sin((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
  41. layer.left=Xdelay+180*Math.cos((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
  42. }
  43. currStep+=step;
  44. }
  45. function delay(){
  46. Ydelay = YgetDelay+=(my-YgetDelay)*1/20;
  47. Xdelay = XgetDelay+=(mx-XgetDelay)*1/20;
  48. stars();
  49. setTimeout('delay()',10);
  50. }
  51. delay();
  52. glow();
  53. }
  54. -->
  55. </script>
  56. <!--星點圍繞_結束-->
複製代碼

 

臉書網友討論
發表於 2013-11-13 01:04:58 | 顯示全部樓層
支持一下吧  

版主招募中

*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-3-19 18:09 , Processed in 0.054714 second(s), 20 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表