Last active
July 2, 2018 10:44
-
-
Save Farmatique/d03f263181e35cfd33b5478dde3755de to your computer and use it in GitHub Desktop.
Collapsed expanded menu button navbar menu button custom
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
<button type="button" class="navbar-toggle collapsed"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
.navbar-toggle { | |
outline: none; | |
width: 30px; | |
height: 50px; | |
background-color: transparent; | |
border: none; | |
padding: 0; | |
position: relative; | |
} | |
.navbar-toggle.collapsed .icon-bar:nth-of-type(1), | |
.navbar-toggle.collapsed .icon-bar:nth-of-type(3){ | |
transform: none; | |
-ms-transform: none; | |
-webkit-transform: none; | |
} | |
.navbar-toggle.collapsed .icon-bar:nth-of-type(1){ | |
top: 0px; | |
} | |
.navbar-toggle.collapsed .icon-bar:nth-of-type(2){ | |
opacity: .6; | |
top: 10px; | |
} | |
.navbar-toggle.collapsed .icon-bar:nth-of-type(3){ | |
top: 20px; | |
} | |
.navbar-toggle .icon-bar{ | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 2px; | |
background-color: #fff; | |
opacity: .6; | |
transition: all 500ms ease-in-out; | |
} | |
.navbar-toggle .icon-bar:nth-of-type(1){ | |
top: 8px; | |
transform: rotate(45deg); | |
-ms-transform: rotate(45deg); | |
-webkit-transform: rotate(45deg); | |
} | |
.navbar-toggle .icon-bar:nth-of-type(2){ | |
opacity: 0; | |
top: 10px; | |
} | |
.navbar-toggle .icon-bar:nth-of-type(3){ | |
top: 8px; | |
transform: rotate(-45deg); | |
-ms-transform: rotate(-45deg); | |
-webkit-transform: rotate(-45deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment