Posted By

iTony on 01/15/08


Tagged

javascript String text shadow


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

snucko


drop a shadow in a text


 / Published in: JavaScript
 

URL: http://stylizedweb.com/2008/01/13/outline-text-with-js/

  1. <script>
  2. <!
  3.  
  4. var message=”Shadow”;
  5. var range=2;
  6. var extra=”font-size:40px;”;
  7. var color1=”gray”;
  8. var color2=”black”;
  9. var x = range;
  10. var y = range;
  11.  
  12. document.write (<span style=’”+extra+” color:+color2+”; position:absolute\; left:+x+”; top:+y+”;’>+message+</span>);
  13. document.write (<span style=’”+extra+” color:+color1+”; position:absolute; left:0; top:0;’>+message+</span>);
  14.  
  15. //–>
  16. </script>

Report this snippet  

You need to login to post a comment.