Created
April 16, 2020 06:05
-
-
Save PaulGwamanda/7dbf507183cf3c509fbcab34dd33afa6 to your computer and use it in GitHub Desktop.
hover over section and underline heading
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
//hover over section and underline heading | |
section{ | |
h2 { | |
text-decoration: none; | |
letter-spacing: 0.15em; | |
display: inline-block; | |
padding: 10px 0; | |
position: relative; | |
} | |
h2:after { | |
bottom: 0; | |
content: ""; | |
display: block; | |
height: 2px; | |
left: 0; | |
position: absolute; | |
background: $primary; | |
transition: width 0.9s ease 0s, left 0.9s ease 0s; | |
width: 0; | |
} | |
&:hover { | |
h2:after { | |
width: 100%; | |
left: 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment