Skip to content

Instantly share code, notes, and snippets.

@atxiii
Created May 9, 2020 06:25
Show Gist options
  • Save atxiii/6f2730c552a4d4313f9466c56adbf595 to your computer and use it in GitHub Desktop.
Save atxiii/6f2730c552a4d4313f9466c56adbf595 to your computer and use it in GitHub Desktop.
Hammy menu / svg / animation
<a href="#" class="link">
<svg viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg" class="svg-hammy">
  <line x1="1" y1="1" x2="10" y2="1" stroke="black" stroke-linecap="round" class="settings-icon__line" />
<line x1="7" y1="4" x2="1" y2="4" stroke="black" stroke-linecap="round" class="settings-icon__line" />
<line x1="1" y1="7" x2="10" y2="7" stroke="black" stroke-linecap="round" class="settings-icon__line" />
</svg>
</a>
html,body,svg { height:100% }
.settings-icon__line{
transition: cubic-bezier(0, -0.01, 0.91, -3) all .4s;
}
.link:hover .settings-icon__line:nth-child(2){
transform:translateX(3px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment