Last active
March 4, 2018 00:12
-
-
Save LeaVerou/1dd8d43442e11b7c5822ae19ad10e3e9 to your computer and use it in GitHub Desktop.
Text-underline-animation
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
/** | |
* Text-underline-animation | |
*/ | |
a { | |
font-size: 500%; | |
text-decoration: none; | |
background: linear-gradient(currentColor, currentColor) bottom / 0 .1em no-repeat; | |
transition: 1s background-size; | |
} | |
a:hover { | |
background-size: 100% .1em; | |
} | |
/* Variations */ | |
a.left { | |
background-position: left bottom; | |
} | |
a.right { | |
background-position: right bottom; | |
} |
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
<p>Hover over the following links: | |
<p><a href="http://lea.verou.me" class="left">From left</a> | |
<p><a href="http://lea.verou.me" class="center">From center</a> | |
<p><a href="http://lea.verou.me" class="right">From right</a> |
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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made my day! :)