How to add shadow to text | Using CSS

We can use the text-shadow property to add drop shadow to text,Aadditionally CSS also provides the box-shadow property which can de used set drop shadows to any element.

Text Shadow using CSS
Text Shadow using CSS

Here is an example on how text-shadow property works:


HTML Code:

<body>
<h1 id="withoutShadow">I Love CSS</h2>
<h1 id="withShadow">I Love CSS</h2>
</body>


CSS Code:

<style>
#withShadow{ text-shadow: 4px 4px 4px #666;}
</style>




Comments

  1. This thing I love in among most of the designs, but it fails to work in IE 8 or below. :(

    ReplyDelete
    Replies
    1. yep you're right IE has poor support for shadow effects

      Delete

Post a Comment

Thanks for Visiting for any questions or suggestions please comment below
Cheers,

Check out

CSS Sprites | What are They?

Login form | Using CSS3

HTML5 Semantic Tags | What do they mean

Remove Scrollbars from syntaxhighlighter

Adding a button in HTML | styling a button

How CSS3 Works

HTML5 | LocalStorage

Advanced Jquery easing | Demo and Download

How to add Jquery easing effects | Jquery tutorial