Created
January 10, 2012 23:17
-
-
Save cecilemuller/1591841 to your computer and use it in GitHub Desktop.
Blurry text on mouseover using CSS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background: #333333; | |
} | |
#menu { | |
font-family: sans-serif; | |
font-size: 3em; | |
} | |
#menu a { | |
display: inline-block; | |
color: transparent; | |
text-shadow: 0px 0px 5px #FFFFFF; | |
-webkit-transition: all 0.3s ease-in-out; | |
-moz-transition: all 0.3s ease-in-out; | |
-o-transition: all 0.3s ease-in-out; | |
-ms-transition: all 0.3s ease-in-out; | |
transition: all 0.3s ease-in-out; | |
} | |
#menu:hover a, | |
#menu a.active { | |
text-shadow: 0px 0px 5px #AAAAAA; | |
} | |
#menu a:hover, | |
#menu a.active { | |
color: #FFFFFF; | |
text-shadow: 0px 0px 1px #FFFFFF; | |
} | |
</style> | |
<!--[if IE]> | |
<style> | |
#menu a { | |
color: #FFFFFF; | |
} | |
#menu:hover a { | |
color: #AAAAAA; | |
} | |
#menu a:hover { | |
color: #FFFFFF; | |
} | |
</style> | |
<![endif]--> | |
</head> | |
<body> | |
<div id="menu"> | |
<a href="#">Item 1</a> | |
<a href="#" class="active">Item 2</a> | |
<a href="#">Item 3</a> | |
<a href="#">Item 4</a> | |
<a href="#">Item 5</a> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment