1 | <SCRIPT LANGUAGE="JavaScript"> |
02 | if (document.all) { |
03 | yourLogo = "Digite seu texto aqui"; |
04 | logoFont = "arial"; |
05 | logoColor = " #000000"; |
06 | yourLogo = yourLogo.split(''); |
07 | L = yourLogo.length; |
08 | TrigSplit = 360 / L; |
09 | Sz = new Array() |
10 | logoWidth = 70; |
11 | logoHeight = -30; |
12 | ypos = 0; |
13 | xpos = 0; |
14 | step = 0.04; |
15 | currStep = 0; |
16 | document.write('<div id="outer" style="position:absolute;top:0px;left:0px "><div style="position:relative">'); |
17 | for (i = 0; i < L; i++) { |
18 | document.write('<div id="ie" style="position:absolute;top:0px;left:0px ;' +'width:10px;height:10px;font-family: '+logoFont+'; font-size:12px;' +'color:'+logoColor+'; text-align:cent er">'+yourLogo[i]+'</div>'); |
19 | } |
20 | document.write('</div></div>'); |
21 | function Mouse() { |
22 | ypos = event.y; |
23 | xpos = event.x - 3; |
24 | } |
25 | document.onmousemove=Mouse; |
26 | function animateLogo() { |
27 | outer.style.pixelTop = document.body.scrollTop; |
28 | for (i = 0; i < L; i++) { |
29 | ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180); |
30 | ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180); |
31 | Sz[i] = ie[i].style.pixelTop - ypos; |
32 | if (Sz[i] < 5) Sz[i] = 3; |
33 | ie[i].style.fontSize = Sz[i] / 1.7; |
34 | } |
35 | currStep -= step; |
36 | setTimeout('animateLogo()', 10); |
37 | } |
38 | window.onload = animateLogo; |
39 | } |
40 | // End --> |
41 | </SCRIPT> |
Comentários