Add a text shadow using CSS3

Text shadows are a beautiful and subtle effect for your web site. CSS3 text shadows are currently support on all versions of Chrome, Safari, Firefox 3.5+, and IE 10+.

Tools:

  • 1 ea browser
  • 1 ea text editor

1text-shadow: 0px 1px 2px #eee;

To apply text-shadow to an HTML element (ie h1) use the standard css syntax: h1 { text-shadow: 0px 1px 2px #eee; } The css property is called text-shadow and from left to right the values are as follows: – 0px represents the shadow offset to the right. – 1px represents the shadow offset below. – 2px represents the spread or blur distance. – Finally, the #eee is the color of the shadow. The offsets can all be negative values as well. So using “-1px” for the first value would move the shadow 1px to the left.


Now learn about:


Discuss this guide

var disqus_shortname = ‘howchootest’; (function() { var dsq = document.createElement(‘script’); dsq.type = ‘text/javascript’; dsq.async = true; dsq.src = ‘//’ + disqus_shortname + ‘.disqus.com/embed.js’; (document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(dsq); })();

Tools:

  • 1 ea browser
  • 1 ea text editor

Leave a Reply

Your email address will not be published. Required fields are marked *