Skip to content

Instantly share code, notes, and snippets.

@waynebcox
Created January 31, 2017 02:16
Show Gist options
  • Save waynebcox/8bc2650617eb2ef6c82a63f0874fd433 to your computer and use it in GitHub Desktop.
Save waynebcox/8bc2650617eb2ef6c82a63f0874fd433 to your computer and use it in GitHub Desktop.
Underline transition from middle out - ref: http://bradsknutson.com/blog/css-sliding-underline/
.sliding-middle-out {
display: inline-block;
position: relative;
padding-bottom: 3px;
}
.sliding-middle-out:after {
content: '';
display: block;
margin: auto;
height: 3px;
width: 0px;
background: transparent;
transition: width .5s ease, background-color .5s ease;
}
.sliding-middle-out:hover:after {
width: 100%;
background: blue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment