How to give text shadow using css
Here is a simple way to give shadow to a text using css.
HTML:
<div id="wrapper">
<span class="firstlayer">Text with shadow using CSS</span>
<span class="secondlayer">Text with shadow using CSS</span>
</div>
CSS:
.firstlayer {
font-size: 18px;
font-weight: bold;
color: #aa0000;
position: absolute;
top: 120px;
left: 20px;
z-index: 1;
}
.secondlayer {
font-size: 18px;
font-weight: bold;
color: #aaa;
position: absolute;
top: 122px;
left: 22px;
z-index: 0;
}
This will give you the result as shown in the picture. I hope this will work in all the browsers.
HTML:
<div id="wrapper">
<span class="firstlayer">Text with shadow using CSS</span>
<span class="secondlayer">Text with shadow using CSS</span>
</div>
CSS:
.firstlayer {
font-size: 18px;
font-weight: bold;
color: #aa0000;
position: absolute;
top: 120px;
left: 20px;
z-index: 1;
}
.secondlayer {
font-size: 18px;
font-weight: bold;
color: #aaa;
position: absolute;
top: 122px;
left: 22px;
z-index: 0;
}
This will give you the result as shown in the picture. I hope this will work in all the browsers.
Labels: CSS, shadow text
2 Comments:
not up to the mark! id="wrapper" is not there...
Amazing!! Thanks..
Post a Comment
Subscribe to Post Comments [Atom]
<< Home