body
#container
#header
#hamburger
.strip#top
.strip#bottom
#dropDown
#background
ul
li Home
li Blog
li Projects
li Authors
li Jobs
li Contact
#body
.content
.left
.right
- for (i=1; i <= 5 ; i++ )
div( id="text" + i )
.content
.left
.right
- for (j=6; j <= 10 ; j++ )
div( id="text" + j )
.content
.left
.right
- for (k=11; k <= 15 ; k++ )
div( id="text" + k )
View Compiled
($time)
transition: all $time ease
transition: all $time ease
transition: all $time ease
transition: all $time ease
transition: all $time ease
()
display: -webkit-box
display: -moz-box
display: -ms-flexbox
display: -webkit-flex
display: flex
html, body
margin: 0
padding: 20px 0
+flex()
justify-content: center
//----------------------------------//
#container
width: 320px
height: 550px
background-color: #ebebeb
overflow: hidden
#header
height: 45px
background-color: #9b9b9b
position: relative
#hamburger
height: 100%
+flex()
flex-direction: column
justify-content: space-between
padding-left: 20px
.strip
width: 25px
height: 2px
background-color: #ffffff
#top
margin-top: 17px
+transition(.25s)
&.topRotate
transform-origin: center
transform: translateY(4px) rotateZ(45deg)
#bottom
margin-bottom: 17px
+transition(.25s)
&.bottomRotate
transform-origin: center
transform: translateY(-5px) rotateZ(-45deg)
#background
width: 100%
height: 0
background-color: #9b9b9b
position: absolute
+transition(.45s)
&.expand
height: 550px
ul
list-style: none
padding: 0
margin: 0
li
display: none
background-color: #9b9b9b
color: #ffffff
font-family: 'Quicksand', sans-serif
font-weight: lighter
font-size: 15px
padding: 20px
padding-left: 60px
&:after
position: absolute
content: ''
left: 60px
width: 60%
height: 1px
bottom: 4px
background: rgba(255, 255, 255, 0.25)
&:last-child:after
width: 0
@for $i from 1 through 6
li:nth-child(#{$i})
animation:
name: fold
duration: 80ms*(6-$i) + 1ms
timing-function: ease-in-out
fill-mode: forwards
li.anim:nth-child(#{$i})
animation:
name: drop
duration: 100ms*$i
timing-function: ease-in-out
fill-mode: forwards
@-webkit-keyframes drop
0%
opacity: 0
transform: scale(1.3)
100%
opacity: 1
transform: scale(1)
@keyframes drop
0%
opacity: 0
transform: scale(1.3)
100%
opacity: 1
transform: scale(1)
@-webkit-keyframes fold
0%
opacity: 1
transform: scale(1)
100%
opacity: 0
transform: scale(0.7)
@keyframes fold
0%
opacity: 1
transform: scale(1)
100%
opacity: 0
transform: scale(0.7)
#body
padding: 0 20px
padding-top: 40px
+flex()
flex-direction: column
justify-content: flex-start
.content
+flex()
flex-direction: row
justify-content: flex-start
margin-bottom: 25px
.left
width: 100px
height: 100px
margin-right: 15px
background-color: #e1e1e1
.right
@for $i from 1 through 15
#text#{$i}
margin-top: 10px
width: 50 + random(100) + px
height: 10px
background-color: #e1e1e1
View Compiled
$(document).ready(function(){
$("#hamburger").click(function(){
$("#top").toggleClass("topRotate");
$("#bottom").toggleClass("bottomRotate");
$("#background").toggleClass("expand");
$("li").show();
$("li").toggleClass("anim");
});
})
This Pen doesn't use any external CSS resources.