Skip to content

Instantly share code, notes, and snippets.

@accrane
Created February 1, 2018 15:25
Show Gist options
  • Save accrane/47e1fc75f197b816ccb61cc703c10135 to your computer and use it in GitHub Desktop.
Save accrane/47e1fc75f197b816ccb61cc703c10135 to your computer and use it in GitHub Desktop.
Animated underline on Navigation
a {
display: block;
text-decoration: none;
color: #000;
position: relative;
padding: 0 10px;
&:before {
content: "";
position: absolute;
width: 100%;
height: 1px;
bottom: 0;
left: 0;
background-color: $color_dark_pink;
visibility: hidden;
@include transition(.3s ease all);
-webkit-transform: scaleX(0);
transform: scaleX(0);
}
&:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment