Created
September 28, 2017 09:52
-
-
Save zaurmag/4ab420865cbcf0ef3038d80c39e7bc03 to your computer and use it in GitHub Desktop.
Иконка humburger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** ===== Humburger ===== **/ | |
.hamburger { | |
display: block; | |
text-decoration: none; | |
position: relative; | |
outline: none; | |
transition: transform .3s ease; | |
height: 20px; | |
width: 30px; | |
z-index: 10; | |
&::before, &::after, > span { | |
background: $blue; | |
content: ""; | |
display: block; | |
transition: transform .3s ease; | |
position: absolute; | |
left: 0; | |
height: 3px; | |
width: 100%; | |
} | |
&::before { | |
top: 0 | |
} | |
& span { | |
top: 50%; | |
transform: translateY(-50%); | |
} | |
&::after { | |
bottom: 0 | |
} | |
&.open { | |
transition: transform .3s ease; | |
} | |
&.open span { | |
left: -50px; | |
opacity: 0; | |
} | |
&.open::after { | |
transform: rotate(-45deg); | |
} | |
&.open::before { | |
transform: rotate(45deg); | |
} | |
&.open::before, &.open::after { | |
top: 7px | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment