Advertisement
slstar

wobbly text

Apr 6th, 2021
1,571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1.  
  2. <div id=<a href="/" style="color: white;
  3. text-shadow: -1px 0 #F900B0, 0 2px #F900B0, 1px 0#F900B0, 0 -1px #F900B0; text-decoration:none;font-weight:bold;font-size:2.6em;text-transform:arial;"><div id="wobble">ZEE เป’๊’ฑ</div></a></div> <script type="text/javascript">
  4. // <![CDATA[
  5. var speed=75; // speed of wobbling, lower is faster
  6. var height=3; // height of wobbling in pixels
  7. var alink="" // page to link text to (set to ="" for no link)
  8.  
  9. /****************************
  10. * Wobbly Text Effect *
  11. *(c) 2003-6 mf2fm web-design*
  12. * http://mf2fm.com/rv *
  13. * DON'T EDIT BELOW THIS BOX *
  14. ****************************/
  15. var wobtxt, wobble, wobcnt=0;
  16. window.onload=function() { if (document.getElementById) {
  17. var i, wobli;
  18. wobble=document.getElementById("wobble");
  19. wobtxt=wobble.firstChild.nodeValue;
  20. while (wobble.childNodes.length) wobble.removeChild(wobble.childNodes[0]);
  21. for (i=0; i<wobtxt.length; i++) {
  22. wobli=document.createElement("span");
  23. wobli.setAttribute("id", "wobb"+i);
  24. http://wobli.style.position="relative";
  25. wobli.appendChild(document.createTextNode(wobtxt.charAt(i)));
  26. if (alink) {
  27. http://wobli.style.cursor="pointer";
  28. wobli.onclick=function() { top.location.href=alink; }
  29. }
  30. wobble.appendChild(wobli);
  31. }
  32. setInterval("wobbler()", speed);
  33. }}
  34.  
  35. function wobbler() {
  36. for (var i=0; i<wobtxt.length; i++) document.getElementById("wobb"+i).style.top=Math.round(height*Math.sin(i+wobcnt))+"px"
  37. wobcnt++;
  38. }
  39. // ]]>
  40. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement