Advertisement
dnwmfilms

↳ ❝ [wobbly] ¡! ❞

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