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.

            
              <div class="menu-button">
  <img class="icon" src="https://goo.gl/wuRPDb">
  <div id="1" class="mini">
    <img class="icon" src="https://goo.gl/m1V4Xv">
  </div>
  <div id="2" class="mini">
    <img class="icon" src="https://goo.gl/bXmZFW">
  </div>
  <div id="3" class="mini">
    <img class="icon" src="https://goo.gl/ruOLiC">
  </div>
</div>
            
          
!
            
              * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.menu-button {
  float: right;
  background: #202020;
  width: 5em;
  height: 5em;
  border-radius: 50%;
  margin: 1em;
  cursor: pointer;
}

.icon {
  width: 100%;
  height: 100%;
  padding: 25%;
}

.mini {
  position: absolute;
  top: 3em;
  right: 3em;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: #202020;
  z-index: -1;
}

.shrink-menu {
  -webkit-animation: shrink-menu .5s 1;
  -moz-animation: shrink-menu .5s 1;
  -o-animation: shrink-menu .5s 1;
  animation: shrink-menu .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

@-webkit-keyframes shrink-menu {
  0% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
  100% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
}

@-moz-keyframes shrink-menu {
  0% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
  100% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
}

@-o-keyframes shrink-menu {
  0% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
  100% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
}

@keyframes shrink-menu {
  0% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
  100% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
}

.grow-menu {
  -webkit-animation: grow-menu .5s 1;
  -moz-animation: grow-menu .5s 1;
  -o-animation: grow-menu .5s 1;
  animation: grow-menu .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

@-webkit-keyframes grow-menu {
  0% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
  100% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
}

@-moz-keyframes grow-menu {
  0% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
  100% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
}

@-o-keyframes grow-menu {
  0% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
  100% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
}

@keyframes grow-menu {
  0% {
    width: 4em;
    height: 4em;
    margin: .5em;
  }
  100% {
    width: 5em;
    height: 5em;
    margin: 1em;
  }
}

.left {
  -webkit-animation: left .5s 1;
  -moz-animation: left .5s 1;
  -o-animation: left .5s 1;
  animation: left .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

.diag {
  -webkit-animation: diag .5s 1;
  -moz-animation: diag .5s 1;
  -o-animation: diag .5s 1;
  animation: diag .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

.down {
  -webkit-animation: down .5s 1;
  -moz-animation: down .5s 1;
  -o-animation: down .5s 1;
  animation: down .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

@-webkit-keyframes left {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
}

@-moz-keyframes left {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
}

@-o-keyframes left {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
}

@keyframes left {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
}

@-webkit-keyframes diag {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
}

@-moz-keyframes diag {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
}

@-o-keyframes diag {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
}

@keyframes diag {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
}

@-webkit-keyframes down {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
}

@-moz-keyframes down {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
}

@-o-keyframes down {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
}

@keyframes down {
  0% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
  100% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
}

.revLeft {
  -webkit-animation: revLeft .5s 1;
  -moz-animation: revLeft .5s 1;
  -o-animation: revLeft .5s 1;
  animation: revLeft .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

.revDiag {
  -webkit-animation: revDiag .5s 1;
  -moz-animation: revDiag .5s 1;
  -o-animation: revDiag .5s 1;
  animation: revDiag .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

.revDown {
  -webkit-animation: revDown .5s 1;
  -moz-animation: revDown .5s 1;
  -o-animation: revDown .5s 1;
  animation: revDown .5s 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode:    forwards;
  -o-animation-fill-mode:      forwards;
  animation-fill-mode:        forwards;
}

@-webkit-keyframes revLeft {
  0% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-moz-keyframes revLeft {
  0% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-o-keyframes revLeft {
  0% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@keyframes revLeft {
  0% {
    top: 1.5em;
    right: 5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-webkit-keyframes revDiag {
  0% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-moz-keyframes revDiag {
  0% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-o-keyframes revDiag {
  0% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@keyframes revDiag {
  0% {
    top: 4em;
    right: 4em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-webkit-keyframes revDown {
  0% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-moz-keyframes revDown {
  0% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@-o-keyframes revDown {
  0% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}

@keyframes revDown {
  0% {
    top: 5em;
    right: 1.5em;
    width: 2em;
    height: 2em;
  }
  100% {
    top: 3em;
    right: 3em;
    width: 1em;
    height: 1em;
  }
}
            
          
!
            
              $menuOpen = false;

$('.menu-button').click( function() {
  if( $menuOpen ) {
    if( $('.menu-button').hasClass('shrink-menu') ) {
      $('.menu-button').removeClass('shrink-menu');
      $('#1').removeClass('left');
      $('#2').removeClass('diag');
      $('#3').removeClass('down');
    }
    $('.menu-button').addClass('grow-menu');
    $('#1').addClass('revLeft');
    $('#2').addClass('revDiag');
    $('#3').addClass('revDown');
    $menuOpen = false;
  }
  else {
    if( $('.menu-button').hasClass('grow-menu') ) {
      $('.menu-button').removeClass('grow-menu');
      $('#1').removeClass('revLeft');
      $('#2').removeClass('revDiag');
      $('#3').removeClass('revDown');
    }
    $('.menu-button').addClass('shrink-menu');
    $('#1').addClass('left');
    $('#2').addClass('diag');
    $('#3').addClass('down');
    $menuOpen = true;
  }
});
            
          
!
999px
Loading ..................

Console