Last active
December 16, 2015 17:30
-
-
Save brianbroken/5471318 to your computer and use it in GitHub Desktop.
CSS: gradient underlines
This file contains hidden or 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
a { | |
position: relative; | |
padding-bottom: 6px; | |
} | |
a:hover::after { | |
content: ""; | |
position: absolute; | |
bottom: 2px; | |
left: 0; | |
height: 1px; | |
width: 100%; | |
background: #444; | |
background: -webkit-gradient(linear, left top, right top, color-stop(0%,transparent), color-stop(50%,#444), color-stop(100%,transparent)); | |
background: -webkit-linear-gradient(left, transparent 0%,#444 50%,transparent 100%); | |
background: -moz-linear-gradient(left, transparent 0%, #444 50%, #transparent 100%); | |
background: -ms-linear-gradient(left, transparent 0%,#444 50%,#transparent 100%); | |
background: -o-linear-gradient(left, transparent 0%,#444 50%,transparent 100%); | |
background: linear-gradient(left, transparent 0%,#444 50%,transparent 100%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment