Advertisement
PayneLess_Designs

PayneLess Designs - Cross Browser Blinking Text

Jun 29th, 2011
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.13 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en-US"><head>
  3. <title>Cross Browser Blinking Text</title>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  5. <meta name="created" content="Thu, 19 May 2011 02:14:20 GMT">
  6. <meta name="description" content="">
  7. <meta name="keywords" content="">
  8. <meta name="author" content="PayneLess Designs">
  9. <meta name="copyright" content="Jan 2004 to present.">
  10.    
  11. <style type="text/css">
  12. * { margin: 0; padding: 0; border: 0; }
  13.  
  14. #wrap {
  15. width: 960px;
  16. margin: 0 auto;
  17. }
  18.  
  19. h1 { text-align: center; }
  20.  
  21. p { margin: 3% 0; }
  22.  
  23. blink {
  24. font-family: helvetica, arial, 'times new roman', sans-serif;
  25. font-size: 1em;
  26. color: #fff;
  27. line-height: 1em;
  28. padding: 5px;
  29. background: #000;
  30. }
  31. </style>
  32.  
  33. <script type="text/javascript">
  34. <!--
  35. function doBlink() {
  36. var blink = document.all.tags("BLINK")
  37. for (var i=0; i<blink.length; i++)
  38. blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
  39. }
  40.  
  41. function startBlink() {
  42. if (document.all)
  43. setInterval("doBlink()",1000)
  44. }
  45. window.onload = startBlink;
  46. // -->
  47. </script>
  48.  
  49. <!--[if IE]>
  50. <link rel="stylesheet" type="text/css" href="iestyle.css">
  51. <![endif]-->
  52. </head><body>
  53. <div id="wrap">
  54.  
  55. <h1>Cross Browser Blinking Text</h1>
  56.  
  57. <p>Place the script between your &lt;head> & &lt;/head> tags. Then use the &lt;blink> and &lt;/blink> tags around the text you would like to have blinking.</p>
  58.  
  59. <pre>
  60. &lt;script type="text/javascript">
  61. &lt;!--
  62. function doBlink() {
  63.     var blink = document.all.tags("BLINK")
  64.     for (var i=0; i&lt;blink.length; i++)
  65.         blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
  66. }
  67.  
  68. function startBlink() {
  69.     if (document.all)
  70.         setInterval("doBlink()",1000)
  71. }
  72. window.onload = startBlink;
  73. // -->
  74. &lt;/script>
  75. </pre>
  76.  
  77. <p>Use the &lt;blink>Text Here&lt;/blink> anywhere in the &lt;body> of your html document.</p>
  78. <p>Example:</p>
  79. <p>Use the <blink>"Blink Text Here"</blink> anywhere in the &lt;body> of your html document. The "blink" tag is undefined for the document type being used here.</p>
  80.  
  81. </div>
  82. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement