Created
March 21, 2019 07:10
-
-
Save sidisinsane/0f1778661b40cebc85a47d623478fc0b to your computer and use it in GitHub Desktop.
Animated Multiline 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
.animated-multiline-underline { | |
display: inline; | |
text-decoration: none; | |
width: calc(100%); /* somehow ie edge seems to need this */ | |
background-image: linear-gradient(transparent calc(100% - 1px), currentColor 100%); | |
background-position: bottom left; | |
background-repeat: no-repeat; | |
background-size: 0% 1px; | |
-webkit-transition: background-size 300ms linear; | |
transition: background-size 300ms linear; | |
} | |
.animated-multiline-underline:hover { | |
background-size: 100% 1px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment