Skip to content

Instantly share code, notes, and snippets.

@yangg
Created March 22, 2012 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangg/2157607 to your computer and use it in GitHub Desktop.
Save yangg/2157607 to your computer and use it in GitHub Desktop.
text-shadow, text-stroke - Learning Css3
/**
* text-shadow, text-stroke - Learning Css3
*/
div { border: solid 1px #ccc; margin: 10px; padding: 0 10px;
font: 2em/1.8 Verdana,Microsoft YaHei,Ubuntu; }
/**
* text-shadow: h-shadow v-shadow blur color;
*/
.text-shadow { text-shadow: 2px 2px #666; font-size: 1.5em; }
.shadow-glow { text-shadow: 0 0 5px #F00; }
.shadow-blur { text-shadow: 2px 2px 5px #F06; }
.shadow-multi { text-shadow: -3px 0px 5px #F00, 2px 0px 5px #666; }
.text-stroke { text-stroke: 1px #000; text-fill-color: transparent;
text-transform: uppercase; font: bold 2.5em/100px Verdana,Microsoft YaHei,Ubuntu; }
<div class="text-shadow">CSS Shadows take three length values, and a color.</div>
<div class="shadow-glow">The length values are a horizontal offset, a vertical offset and a blur. Offsets may be negative or positive.</div>
<div class="shadow-blur">Note: The text-shadow property attaches one or more shadows to text.</div>
<div class="shadow-multi"> The property is a comma-separated list of shadows, each specified by 2 or 3 length values and an optional color. Omitted lengths are 0.</div>
<div class="text-stroke">Stroke of Genius</div>
{"view":"split-vertical","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment