Created
January 5, 2022 11:07
-
-
Save elfacht/0f134f1c09782bd388834280abebf6a4 to your computer and use it in GitHub Desktop.
Animated multiline link underlines with CSS
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
/* @source https://www.dannyguo.com/blog/animated-multiline-link-underlines-with-css/ */ | |
a { | |
text-decoration: none; | |
background-image: linear-gradient(currentColor, currentColor); | |
background-position: 0% 100%; | |
background-repeat: no-repeat; | |
background-size: 0% 2px; | |
transition: background-size .3s; | |
} | |
a:hover { | |
background-size: 100% 2px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment