/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script> <!– var message=â€Bothâ€; var thickness=1; var color2=â€blackâ€; var color1=â€whiteâ€; var color3=â€grayâ€; var extra=â€font-size:40px;â€; var range=5; var z = range; var d = range; var x = -thickness; var y = -thickness; while (y<=thickness) { while (x<=thickness) { document.write (â€<span style=’â€+extra+†color:â€+color2+â€; position:absolute; left:â€+x+â€; top:â€+(-y)+â€;’>â€+message+â€</span>â€); document.write (â€<span style=’â€+extra+†color:â€+color2+â€; position:absolute; left:â€+x+â€; top:0;’>â€+message+â€</span>â€); document.write (â€<span style=’â€+extra+†color:â€+color2+â€; position:absolute; left:â€+x+â€; top:â€+y+â€;’>â€+message+â€</span>â€); x=x+1; } y=y+1; } document.write (â€<span style=’â€+extra+†color:â€+color3+â€; position:absolute\; left:â€+z+â€; top:â€+d+â€;’>â€+message+â€</span>â€); document.write (â€<span style=’â€+extra+†color:â€+color1+â€; position:absolute; left:0; top:0;’>â€+message+â€</span>â€); //–> </script>
URL: http://stylizedweb.com/2008/01/13/outline-text-with-js/