Skip to content

Instantly share code, notes, and snippets.

@jesusr
Last active August 29, 2015 14:09
Show Gist options
  • Save jesusr/fa32e019652c66e5446d to your computer and use it in GitHub Desktop.
Save jesusr/fa32e019652c66e5446d to your computer and use it in GitHub Desktop.
Nice effect for the hover event
/* More simple transition, without underline effect
a:hover
color: #7f270a
text-decoration: none
+transition-duration(.7s)
+transition-property(all)
+transition-timing-function(ease-in-out)
/* A elements decoration with
a,a:hover
color: #c63d0f
text-decoration: none
+transition-duration(.7s)
+transition-property(all)
+transition-timing-function(ease-in-out)
a
position: relative
display: inline-block
&:before
content: ""
position: absolute
width: 100%
height: 2px
bottom: 0
left: 0
background-color: #7f270a
visibility: hidden
+transform(scaleX(0))
+transition-duration(.7s)
+transition-property(all)
+transition-timing-function(ease-in-out 0s)
&:hover
color: #7f270a
text-decoration: none
&:before
visibility: visible
+transform(scaleX(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment