cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <h1 class="title">Hamburger [<span class="barry">menu</span>]</h1>

<div class="hamburger-menu">
  <span class="seed"></span>
  <span class="seed"></span>
  <span class="seed"></span>
  <span class="seed"></span>
		  <div class="burgher"></div>	
	</div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Fredoka+One);
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* VARS */
$burgher-width: 100px;
$burgher-height: 10px;
$burgher-spacing: 25px;
$seed-width: 2px;
$seed-height: 4px;
$seed-num: 3;
$ingredient-height: 4px;
$bun-color: #ED9728;
$meat-color: #A65E09;
$tomato-color: #FF6347;
$salad-color: #55AB55;
$background-color: #FAF494;
$font: 'Fredoka One';
$font-color: #403121;
$bounced-timing: cubic-bezier(.64,.57,.47,1.29);
$ease-timing: cubic-bezier(0.23, 1, 0.32, 1);

body {
	background: $background-color;
}

.title {
  font-size: 40px;
  line-height: 60px;
  color: $font-color;
  font-family: $font;
  text-align: center;
  padding-top: 5%;

}



.hamburger-menu {
	position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: $burgher-width;
	height: $burgher-height + $burgher-spacing*2;
	cursor: pointer;
  
  .seed {
    width: $seed-width;
    height: $seed-height;
    border-radius: 2px;
    display: inline-block;
    background: lighten($bun-color, 20%);
    position: absolute;
    z-index:9;
    transition: top 300ms $bounced-timing;
    
    &:nth-child(1) {
      top: -10px; 
      left: 21px;
    }
    &:nth-child(2) {
      top: -6px; 
      left: 43px;
    }
    &:nth-child(3) {
      top: -12px; 
      left: 61px;
    }
    &:nth-child(4) {
      top: -8px; 
      left: 81px;
    }
  }
}
.hamburger-menu:hover {
  .seed {
    &:nth-child(1) {
      top: -10px + ($burgher-height + $ingredient-height); 
    }
    &:nth-child(2) {
      top: -6px + ($burgher-height + $ingredient-height); 
    }
    &:nth-child(3) {
      top: -12px + ($burgher-height + $ingredient-height); 
    }
    &:nth-child(4) {
      top: -8px + ($burgher-height + $ingredient-height); 
    }
   }
  &:before {
    top: 21px;
     animation: none;
  }
  &:after {
    bottom: 21px;
    animation: none;
  }
  .burgher:before {
	  bottom: $burgher-height + $ingredient-height;
	  transition: bottom 300ms $bounced-timing;
  }
  .burgher:after {
	  top: $burgher-height + 4;
	  transition: top 300ms $bounced-timing;
  }
}

.hamburger-menu:before,
.hamburger-menu:after,
.burgher,
.burgher:after,
.burgher:before {
  width: $burgher-width;
	height: $burgher-height;
}
.hamburger-menu:before,
.hamburger-menu:after {height: $ingredient-height;}

// tomato
.hamburger-menu:before {
	content: "";
	position: absolute;
	left: 0;
	top: $burgher-spacing - $burgher-height;
  background: $tomato-color;
	transition: top 300ms $bounced-timing;
  border-radius: 2px;
  animation: floaty 3s infinite alternate linear;
}

// salad
.hamburger-menu:after {
	content: "";
	position: absolute;
	left: 0;
	bottom: $burgher-spacing - $burgher-height;
  background: $salad-color;
	transition: bottom 300ms $bounced-timing;
  border-radius: 2px;
  animation: floaty 3s infinite alternate linear;
}

// meat
.burgher {
	position: relative;
	transform: translateY($burgher-spacing);
  background: $meat-color;
	transition: all 0ms 300ms;
  border-radius: 2px;
}

// top bun
.burgher:before {
	content: "";
	position: absolute;
	left: 0;
	bottom: $burgher-spacing;
  background: $bun-color;
	transition: bottom 300ms $bounced-timing;
  width:$burgher-width;
  height: $burgher-height * 3;
  border-radius: 50% 50% 2px 2px;
}

// bottom bun
.burgher:after {
	content: "";
	position: absolute;
	left: 0;
	top: $burgher-spacing;
  background: $bun-color;
	transition: top 300ms $bounced-timing;
  border-radius: 2px;
}


@keyframes floaty {
  0% {
    transform: translate3d(1px, 1px, 0);
  }
  50% {
    transform: translate3d(0, -1px, 0);
  }
  100% {
    transform: translate3d(-1px, 1px, 0);
  }
}
            
          
!
999px
Loading ..................

Console