This time I will share jQuery Plugin and tutorial about Responsive Off-canvas Sidebar Navigation With jQuery And CSS3, hope it will help you in programming stack.
A jQuery/CSS3 based responsive, off-canvas navigation where the sidebar menu is displayed by sliding the entire page to the left (or right) side when toggled.
How to use it:
1. Create the sidebar navigation that is hidden on page load.
02 |
< ul class = "sidebar-list" > |
03 |
< li class = "sidebar-item" > |
04 |
< a href = "#" class = "sidebar-anchor" >Item 1</ a > |
06 |
< li class = "sidebar-item" > |
07 |
< a href = "#" class = "sidebar-anchor" >Item 2</ a > |
09 |
< li class = "sidebar-item" > |
10 |
< a href = "#" class = "sidebar-anchor" >Item 3</ a > |
2. Create a button to toggle the sidebar navigation.
1 |
< div class = "nav-right visible-xs" > |
2 |
< div class = "button" id = "btn" > |
3 |
< div class = "bar top" ></ div > |
4 |
< div class = "bar middle" ></ div > |
5 |
< div class = "bar bottom" ></ div > |
3. Insert another hidden toggle button into the main content.
03 |
< div class = "nav-right hidden-xs" > |
04 |
< div class = "button" id = "btn" > |
05 |
< div class = "bar top" ></ div > |
06 |
< div class = "bar middle" ></ div > |
07 |
< div class = "bar bottom" ></ div > |
4. Insert another hidden toggle button into the main content.
005 |
background-color : #2D3142 ; |
006 |
-webkit-transition: transform . 7 s ease-in-out; |
007 |
-moz-transition: transform . 7 s ease-in-out; |
008 |
-ms-transition: transform . 7 s ease-in-out; |
009 |
-o-transition: transform . 7 s ease-in-out; |
010 |
transition: transform . 7 s ease-in-out; |
020 |
background-color : #EF8354 ; |
024 |
-webkit-transform: translateX( -400px ); |
025 |
-moz-transform: translateX( -400px ); |
026 |
-ms-transform: translateX( -400px ); |
027 |
-o-transform: translateX( -400px ); |
028 |
transform: translateX( -400px ); |
031 |
nav { padding-top : 30px ; } |
045 |
-webkit-transform: translateY( -20px ); |
046 |
-moz-transform: translateY( -20px ); |
047 |
-ms-transform: translateY( -20px ); |
048 |
-o-transform: translateY( -20px ); |
049 |
transform: translateY( -20px ); |
052 |
.sidebar-item:first-child { |
053 |
-webkit-transition: all . 7 s . 2 s ease-in-out; |
054 |
-moz-transition: all . 7 s . 2 s ease-in-out; |
055 |
-ms-transition: all . 7 s . 2 s ease-in-out; |
056 |
-o-transition: all . 7 s . 2 s ease-in-out; |
057 |
transition: all . 7 Share this:
|