Last active
November 21, 2015 12:59
-
-
Save TangChr/9560fc9f5ad1b13281c7 to your computer and use it in GitHub Desktop.
CSS: Link with different color for underline
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> | |
<head> | |
<title>Link Color</title> | |
</head> | |
<style> | |
body { | |
background: #2c3e50; | |
font-family: Arial, Verdana, sans-serif; | |
} | |
h1 { | |
font-size: 50px; | |
} | |
a, | |
a:active, | |
a:visited { | |
color: #808080; | |
text-decoration: none; | |
} | |
a:hover { | |
text-decoration: underline; | |
} | |
a span { | |
color: #fff; | |
} | |
</style> | |
</head> | |
<body> | |
<h1> | |
<a href="#"> | |
<span>This is a link</span> | |
</a> | |
</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment