Skip to content

Instantly share code, notes, and snippets.

@dotnetCarpenter
Forked from LeaVerou/dabblet.css
Last active September 27, 2016 16:35
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 dotnetCarpenter/08837bd7a20c9edb59463760a0dd09b8 to your computer and use it in GitHub Desktop.
Save dotnetCarpenter/08837bd7a20c9edb59463760a0dd09b8 to your computer and use it in GitHub Desktop.
Text-underline-animation
/**
* 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;
}
<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>
// alert('Hello world!');
{"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