Skip to content

Instantly share code, notes, and snippets.

@netviperinc
Created June 23, 2015 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netviperinc/28ace2fe3758abb10f32 to your computer and use it in GitHub Desktop.
Save netviperinc/28ace2fe3758abb10f32 to your computer and use it in GitHub Desktop.
Hamburger Option 2
.c-hamburger--htx {
background-color: #ff3264;
}
.c-hamburger--htx span {
transition: background 0s 0.3s;
}
.c-hamburger--htx span::before,
.c-hamburger--htx span::after {
transition-duration: 0.3s, 0.3s;
transition-delay: 0.3s, 0s;
}
.c-hamburger--htx span::before {
transition-property: top, transform;
}
.c-hamburger--htx span::after {
transition-property: bottom, transform;
}
/* active state, i.e. menu open */
.c-hamburger--htx.is-active {
background-color: #cb0032;
}
.c-hamburger--htx.is-active span {
background: none;
}
.c-hamburger--htx.is-active span::before {
top: 0;
transform: rotate(45deg);
}
.c-hamburger--htx.is-active span::after {
bottom: 0;
transform: rotate(-45deg);
}
.c-hamburger--htx.is-active span::before,
.c-hamburger--htx.is-active span::after {
transition-delay: 0s, 0.3s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment