01 | Criado Por Fabio Roberto Poletto **soartes** |
02 |
03 | <style> |
04 | #theDiv { |
05 | POSITION : relative; Z-INDEX : 8; VISIBILITY : visible; ALIGN : center; |
06 | } |
07 | </style> |
08 |
09 |
10 | <script language="JavaScript"> |
11 | //script found on a1javascripts.com |
12 | //full credit to the unknown autor |
13 | function nextSize(i,incMethod,textLength) |
14 | { |
15 | if (incMethod == 1) { return (22*Math.abs(Math.sin(i/(textLength/3.14))) ); |
16 | } |
17 | if (incMethod == 2) { return (255*Math.abs(Math.cos(i/(textLength/3.14)))); |
18 | } |
19 | return(0) |
20 | } |
21 | function sizeCycle(text,method,dis) |
22 | { |
23 | var output = ""; |
24 | for (i = 0; i < text.length; i++) { |
25 | size = parseInt(nextSize(i +dis,method,text.length)); |
26 | output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>"; |
27 | } |
28 | if (document.all) |
29 | theDiv.innerHTML = output; |
30 | else if (document.getElementById){ |
31 | rng = document.createRange(); |
32 | el = document.getElementById('theDiv'); |
33 | rng.setStartBefore(el); |
34 | htmlFrag = rng.createContextualFragment(output); |
35 | while (el.hasChildNodes()) el.removeChild(el.lastChild); |
36 | el.appendChild(htmlFrag);} |
37 | else if (document.layers){ |
38 |
39 | document.theDiv.document.write("<font face='Arial'point-size=11>"+output+"</font>"); |
40 | document.theDiv.document.close();} |
41 |
42 |
43 | } |
44 | //place your text here |
45 |
46 | function doWave(n) { |
47 | var theText = 'Fabio Poletto**soartes**'; |
48 |
49 | sizeCycle(theText,1,n); |
50 | if (n > theText.length) { |
51 | n=0 |
52 | } |
53 | setTimeout("doWave(" + (n+1) + ")", 50); |
54 | } |
55 |
56 | </script> |
57 |
58 |
59 | <body onload="doWave(0)"> |
60 |
61 |
62 | <div ID="theDiv" align="center"></div> | VEJA O CODIGO EM AÇÃO |
Comentários