Created
October 5, 2016 17:23
-
-
Save ElmiraMukhamedjanova/08a8d6d122a48f0cfbf8352b171f1a46 to your computer and use it in GitHub Desktop.
Humburger holder
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
| <div class="hamburger_holder"> | |
| <div class="hamburger hamburger--spin"> | |
| <div class="hamburger-box"> | |
| <div class="hamburger-inner"></div> | |
| </div> | |
| </div> | |
| </div> |
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
| $('.hamburger_holder').click(function(){ | |
| $('.hamburger_holder .hamburger').toggleClass('is-active'); | |
| $('.navcloser').toggleClass('active'); | |
| }); |
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
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> |
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
| .hamburger_holder { | |
| cursor: pointer; | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| z-index: 2 | |
| } | |
| .hamburger { | |
| background-color: #f00; | |
| -webkit-transition-property: opacity, -webkit-filter; | |
| transition-property: opacity, -webkit-filter; | |
| transition-property: opacity, filter; | |
| -webkit-transition-property: opacity, filter, -webkit-filter; | |
| transition-property: opacity, filter, -webkit-filter; | |
| -webkit-transition-duration: 0.15s; | |
| transition-duration: 0.15s; | |
| -webkit-transition-timing-function: linear; | |
| transition-timing-function: linear; | |
| font: inherit; | |
| color: inherit; | |
| text-transform: none; | |
| background-color: transparent; | |
| border: 0; | |
| margin: 14px 0 0; | |
| overflow: visible | |
| } | |
| .hamburger-box { | |
| width: 40px; | |
| height: 24px; | |
| display: inline-block; | |
| position: relative; | |
| background-color: #f00; | |
| } | |
| .hamburger-inner { | |
| display: block; | |
| top: 50%; | |
| margin-top: -2px | |
| } | |
| .hamburger-inner, | |
| .hamburger-inner::before, | |
| .hamburger-inner::after { | |
| width: 22px; | |
| height: 3px; | |
| background-color: #fff; | |
| position: absolute; | |
| -webkit-transition-property: -webkit-transform; | |
| transition-property: -webkit-transform; | |
| transition-property: transform; | |
| -webkit-transition-property: -webkit-transform, -webkit-transform; | |
| transition-property: transform, -webkit-transform; | |
| -webkit-transition-duration: 0.15s; | |
| transition-duration: 0.15s; | |
| -webkit-transition-timing-function: ease; | |
| transition-timing-function: ease | |
| } | |
| .hamburger-inner::before, | |
| .hamburger-inner::after { | |
| content: ""; | |
| display: block | |
| } | |
| .hamburger-inner::before { | |
| top: -7px | |
| } | |
| .hamburger-inner::after { | |
| bottom: -7px | |
| } | |
| .hamburger--spin .hamburger-inner { | |
| -webkit-transition-duration: 0.3s; | |
| transition-duration: 0.3s; | |
| -webkit-transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
| transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19) | |
| } | |
| .hamburger--spin .hamburger-inner::before { | |
| -webkit-transition: top 0.1s 0.34s ease-in, opacity 0.1s ease-in; | |
| transition: top 0.1s 0.34s ease-in, opacity 0.1s ease-in | |
| } | |
| .hamburger--spin .hamburger-inner::after { | |
| -webkit-transition: bottom 0.1s 0.34s ease-in, -webkit-transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
| transition: bottom 0.1s 0.34s ease-in, -webkit-transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
| transition: bottom 0.1s 0.34s ease-in, transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
| -webkit-transition: bottom 0.1s 0.34s ease-in, -webkit-transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19), -webkit-transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19); | |
| transition: bottom 0.1s 0.34s ease-in, transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19), -webkit-transform 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19) | |
| } | |
| .hamburger--spin.is-active .hamburger-inner { | |
| -webkit-transform: rotate(225deg); | |
| -ms-transform: rotate(225deg); | |
| transform: rotate(225deg); | |
| -webkit-transition-delay: 0.14s; | |
| transition-delay: 0.14s; | |
| -webkit-transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); | |
| transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1) | |
| } | |
| .hamburger--spin.is-active .hamburger-inner::before { | |
| top: 0; | |
| opacity: 0; | |
| -webkit-transition: top 0.1s ease-out, opacity 0.1s 0.14s ease-out; | |
| transition: top 0.1s ease-out, opacity 0.1s 0.14s ease-out | |
| } | |
| .hamburger--spin.is-active .hamburger-inner::after { | |
| bottom: 0; | |
| -webkit-transform: rotate(-90deg); | |
| -ms-transform: rotate(-90deg); | |
| transform: rotate(-90deg); | |
| -webkit-transition: bottom 0.1s ease-out, -webkit-transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| transition: bottom 0.1s ease-out, -webkit-transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| transition: bottom 0.1s ease-out, transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| -webkit-transition: bottom 0.1s ease-out, -webkit-transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1), -webkit-transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1); | |
| transition: bottom 0.1s ease-out, transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1), -webkit-transform 0.3s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment