xsdot_css_burger
.hamburger { padding: 16px 13px; /* top left */ display: inline-block; cursor: pointer; transition-property: opacity, filter; transition-duration: 0.15s; transition-timing-function: linear; font: inherit; color: inherit; text-transform: none; background-color: transparent; border: 0; margin: 0; overflow: visible; } .hamburger:hover { opacity: 0.7; } .hamburger.is-active:hover { opacity: 0.7; } .hamburger.is-active .hamburger-inner, .hamburger.is-active .hamburger-inner::before, .hamburger.is-active .hamburger-inner::after {background-color: #ffffff; } .hamburger-box { width: 32px; height: 24px; display: inline-block; position: relative; } .hamburger-inner { display: block; top: 50%; margin-top: -0px; } .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after { width: 20px; /* width */ height: 3px; /* line height */ background-color: #ffffff; border-radius: 2px; position: absolute; transition-property: transform; transition-duration: 0.15s; transition-timing-function: ease; } .hamburger-inner::before, .hamburger-inner::after { content: ""; display: block; } .hamburger-inner::before { top: -10px; } .hamburger-inner::after { bottom: -10px; } .hamburger--slider .hamburger-inner { top: 4px; /* height c */ } .hamburger--slider .hamburger-inner::before { top: 8px; / * height a */ transition-property: transform, opacity; transition-timing-function: ease; transition-duration: 0.15s; } .hamburger--slider .hamburger-inner::after { top: 16px; /* height c */ } .hamburger--slider.is-active .hamburger-inner { transform: translate3d(0, 8px, 0) rotate(45deg); } .hamburger--slider.is-active .hamburger-inner::before { transform: rotate(-45deg) translate3d(-5.71429px, -6px, 0); opacity: 0; } .hamburger--slider.is-active .hamburger-inner::after { transform: translate3d(0, -16px, 0) rotate(-90deg); }