Return to Snippet

Revision: 4663
at January 15, 2008 00:55 by iTony


Initial Code
<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>

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

Initial Description

                                

Initial Title
drop a shadow and outline the text.

Initial Tags
text

Initial Language
JavaScript