影音先锋男人资源av站_狠狠色综合激情丁香五月_爱爱爱爱看视频_在线播放免费人成视频在线观看_少妇人妻综合久久中文字幕_国产午夜无码精品免费看_久久久久久夜精品精品免费啦_男人女人午夜视频免费_日本xxxx裸体xxxx_丰满人妻熟妇乱又仑精品

電子科大論壇-非清水河畔

 找回密碼
 注冊(cè)(開(kāi)放注冊(cè))
查看: 7476|回復(fù): 2
打印 上一主題 下一主題

[應(yīng)用技術(shù)] 非常華麗的時(shí)間跟隨鼠標(biāo)特效

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
1#
發(fā)表于 2007-1-28 15:49:03 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
大家把一下代碼放到  下面的網(wǎng)址   里面

點(diǎn)擊“運(yùn)行”,呵呵

pp吧!

網(wǎng)址

  1. http://www.sucai86.com/texiaofile/936_view.htm
復(fù)制代碼


代碼:

  1. <title>非常華麗的時(shí)間跟隨鼠標(biāo)特效</title>
  2. </script>
  3. <script language=JavaScript>
  4. dCol='red';//date colour.
  5. fCol='black';//face colour.
  6. sCol='c0c033';//seconds colour.
  7. mCol='ff00ff';//minutes colour.
  8. hCol='black';//hours colour.
  9. ClockHeight=25;
  10. ClockWidth=40;
  11. ClockFromMouseY=0;
  12. ClockFromMouseX=100;

  13. //Alter nothing below! Alignments will be lost!

  14. d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
  15. m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
  16. date=new Date();
  17. day=date.getDate();
  18. year=date.getYear();
  19. if (year < 2000) year=year+1900;
  20. TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
  21. D=TodaysDate.split('');
  22. H='...';
  23. H=H.split('');
  24. M='....';
  25. M=M.split('');
  26. S='.....';
  27. S=S.split('');
  28. Face='1 2 3 4 5 6 7 8 9 10 11 12';
  29. font='Arial';
  30. size=1;
  31. speed=0.6;
  32. ns=(document.layers);
  33. ie=(document.all);
  34. Face=Face.split(' ');
  35. n=Face.length;
  36. a=size*10;
  37. ymouse=0;
  38. xmouse=0;
  39. scrll=0;
  40. props="<font face="+font+" size="+size+" color="+fCol+">";
  41. props2="<font face="+font+" size="+size+" color="+dCol+">";
  42. Split=360/n;
  43. Dsplit=360/D.length;
  44. HandHeight=ClockHeight/4.5
  45. HandWidth=ClockWidth/4.5
  46. HandY=-7;
  47. HandX=-2.5;
  48. scrll=0;
  49. step=0.06;
  50. currStep=0;
  51. y=new Array();x=new Array();Y=new Array();X=new Array();
  52. for (i=0; i < n; i++){y=0;x=0;Y=0;X=0}
  53. Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
  54. for (i=0; i < D.length; i++){Dy=0;Dx=0;DY=0;DX=0}
  55. if (ns){
  56. for (i=0; i < D.length; i++)
  57. document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D+'</center></layer>');
  58. for (i=0; i < n; i++)
  59. document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face+'</center></layer>');
  60. for (i=0; i < S.length; i++)
  61. document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><center>'+S+'</center></layer>');
  62. for (i=0; i < M.length; i++)
  63. document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><center>'+M+'</center></layer>');
  64. for (i=0; i < H.length; i++)
  65. document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><center>'+H+'</center></layer>');
  66. }
  67. if (ie){
  68. document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  69. for (i=0; i < D.length; i++)
  70. document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D+'</div>');
  71. document.write('</div></div>');
  72. document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  73. for (i=0; i < n; i++)
  74. document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face+'</div>');
  75. document.write('</div></div>');
  76. document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  77. for (i=0; i < H.length; i++)
  78. document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H+'</div>');
  79. document.write('</div></div>');
  80. document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  81. for (i=0; i < M.length; i++)
  82. document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M+'</div>');
  83. document.write('</div></div>')
  84. document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
  85. for (i=0; i < S.length; i++)
  86. document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S+'</div>');
  87. document.write('</div></div>')
  88. }
  89. (ns)?window.captureEvents(Event.MOUSEMOVE):0;
  90. function Mouse(evnt){
  91. ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
  92. xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
  93. }
  94. (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
  95. function ClockAndAssign(){
  96. time = new Date ();
  97. secs = time.getSeconds();
  98. sec = -1.57 + Math.PI * secs/30;
  99. mins = time.getMinutes();
  100. min = -1.57 + Math.PI * mins/30;
  101. hr = time.getHours();
  102. hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
  103. if (ie){
  104. Od.style.top=window.document.body.scrollTop;
  105. Of.style.top=window.document.body.scrollTop;
  106. Oh.style.top=window.document.body.scrollTop;
  107. Om.style.top=window.document.body.scrollTop;
  108. Os.style.top=window.document.body.scrollTop;
  109. }
  110. for (i=0; i < n; i++){
  111. var F=(ns)?document.layers['nsFace'+i]:ieFace.style;
  112. F.top=y + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
  113. F.left=x + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
  114. }
  115. for (i=0; i < H.length; i++){
  116. var HL=(ns)?document.layers['nsHours'+i]:ieHours.style;
  117. HL.top=y+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
  118. HL.left=x+HandX+(i*HandWidth)*Math.cos(hrs);
  119. }
  120. for (i=0; i < M.length; i++){
  121. var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes.style;
  122. ML.top=y+HandY+(i*HandHeight)*Math.sin(min)+scrll;
  123. ML.left=x+HandX+(i*HandWidth)*Math.cos(min);
  124. }
  125. for (i=0; i < S.length; i++){
  126. var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds.style;
  127. SL.top=y+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
  128. SL.left=x+HandX+(i*HandWidth)*Math.cos(sec);
  129. }
  130. for (i=0; i < D.length; i++){
  131. var DL=(ns)?document.layers['nsDate'+i]:ieDate.style;
  132. DL.top=Dy + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
  133. DL.left=Dx + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
  134. }
  135. currStep-=step;
  136. }
  137. function Delay(){
  138. scrll=(ns)?window.pageYOffset:0;
  139. Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
  140. Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
  141. for (i=1; i < D.length; i++){
  142. Dy=Math.round(DY+=(Dy[i-1]-DY)*speed);
  143. Dx=Math.round(DX+=(Dx[i-1]-DX)*speed);
  144. }
  145. y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
  146. x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
  147. for (i=1; i < n; i++){
  148. y=Math.round(Y+=(y[i-1]-Y)*speed);
  149. x=Math.round(X+=(x[i-1]-X)*speed);
  150. }
  151. ClockAndAssign();
  152. setTimeout('Delay()',20);
  153. }
  154. if (ns||ie)window.onload=Delay;
  155. </script>
復(fù)制代碼

[ 本帖最后由 csdsq 于 2007-1-28 15:56 編輯 ]
2#
發(fā)表于 2007-1-28 18:04:27 | 只看該作者
靠~這么多!不試了
3#
 樓主| 發(fā)表于 2007-1-28 18:38:54 | 只看該作者
相當(dāng)不錯(cuò)!

本版積分規(guī)則

手機(jī)訪問(wèn)本頁(yè)請(qǐng)
掃描左邊二維碼
本網(wǎng)站聲明
本網(wǎng)站所有內(nèi)容為網(wǎng)友上傳,若存在版權(quán)問(wèn)題或是相關(guān)責(zé)任請(qǐng)聯(lián)系站長(zhǎng)!
站長(zhǎng)電話:0898-66661599    站長(zhǎng)聯(lián)系QQ:12726567   
站長(zhǎng)微信:hainanok
請(qǐng)掃描右邊二維碼
www.myujob.com

小黑屋|手機(jī)版|Archiver|電子科大論壇-非清水河畔 ( 瓊ICP備10001196號(hào)-2 )

GMT+8, 2025-11-6 08:49 , Processed in 0.134678 second(s), 14 queries .

Powered by 校園招聘信息

© 2001-2020 電子科大論壇-非清水河畔校園招聘

快速回復(fù) 返回頂部 返回列表