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.

            
              <a href="#" class="menu-icon">
  <span></span>
  <span></span>
  <span></span>
</a>
<ul class="menu">
  <li><a href="#">Home</a></li>
  <li><a href="#">Blog</a></li>
  <li><a href="#">About</a></li>
  <li><a href="#">Work</a></li>
  <li><a href="#">Contact</a></li>
</ul>
<header class="site-header">
  <h1>FullScreen Menu</h1>
  <h2>There's never one sunrise the same or one sunset the same.</h2>
</header>

<p><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt placeat, aliquam sed non sint nisi totam molestiae earum id quasi at, dolores, culpa sapiente impedit deleniti natus ut ipsam laudantium.</span><span>Maxime inventore accusantium, numquam quisquam officia aliquid amet dolorem, deserunt placeat! Modi et corporis tempore molestias minima! Soluta distinctio nam, consequuntur impedit architecto quaerat dolores quisquam repellendus minima, placeat fugit?</span></p>
<p><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt placeat, aliquam sed non sint nisi totam molestiae earum id quasi at, dolores, culpa sapiente impedit deleniti natus ut ipsam laudantium.</span><span>Maxime inventore accusantium, numquam quisquam officia aliquid amet dolorem, deserunt placeat! Modi et corporis tempore molestias minima! Soluta distinctio nam, consequuntur impedit architecto quaerat dolores quisquam repellendus minima, placeat fugit?</span></p>
<p><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt placeat, aliquam sed non sint nisi totam molestiae earum id quasi at, dolores, culpa sapiente impedit deleniti natus ut ipsam laudantium.</span><span>Maxime inventore accusantium, numquam quisquam officia aliquid amet dolorem, deserunt placeat! Modi et corporis tempore molestias minima! Soluta distinctio nam, consequuntur impedit architecto quaerat dolores quisquam repellendus minima, placeat fugit?</span></p>
<p><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt placeat, aliquam sed non sint nisi totam molestiae earum id quasi at, dolores, culpa sapiente impedit deleniti natus ut ipsam laudantium.</span><span>Maxime inventore accusantium, numquam quisquam officia aliquid amet dolorem, deserunt placeat! Modi et corporis tempore molestias minima! Soluta distinctio nam, consequuntur impedit architecto quaerat dolores quisquam repellendus minima, placeat fugit?</span></p>
<p><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt placeat, aliquam sed non sint nisi totam molestiae earum id quasi at, dolores, culpa sapiente impedit deleniti natus ut ipsam laudantium.</span><span>Maxime inventore accusantium, numquam quisquam officia aliquid amet dolorem, deserunt placeat! Modi et corporis tempore molestias minima! Soluta distinctio nam, consequuntur impedit architecto quaerat dolores quisquam repellendus minima, placeat fugit?</span></p>
            
          
!
            
              * {
  box-sizing: border-box;
}
body {
  font-size: 16px;
  font-family: 'Inconsolata', monospace;
}
p {
  max-width: 600px;
  margin: 0 auto 20px auto;
  padding: 0 20px;
  line-height: 1.5;
  font-size: 0.95em;
}

.site-header {
  background: url(https://images.unsplash.com/photo-1414490929659-9a12b7e31907?crop=entropy&fit=crop&fm=jpg&h=650&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1375) no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin-bottom: 50px;
  width: 100%;
  h1,h2 {
    color: #fff;
    margin: 0;
    text-shadow: 0px 0px 25px rgba(#000, 0.85);
  }
  h1 {
    font-size: 2em;
    @media (min-width: 600px) {
      font-size: 4em;
    }
  }
  h2 {
    font-size: 12px;
    letter-spacing: -0.03em;
    line-height: 3;
    @media (min-width: 600px) {
      font-size: 1em;
    }
  } 
}

/* Menu */
.menu-icon {
  //background: #000;
  position: absolute;
  top: 20px;
  right: 20px;
  display: block;
  width: 40px;
  height: 35px;
  z-index: 1000;
  
  span {
    background: #fff;
    display: block;
    width: 100%;
    height: 5px;
    position: absolute;
    transition: all 0.2s ease-in-out;
    
    &:nth-child(1) {
      top: 0;
    }
    &:nth-child(2) {
      top: 15px;
    }
    &:nth-child(3) {
      top: 30px;
    }
  }
  
  &.active{
    span:nth-child(1) {
      top: 15px;
      transform: rotate(45deg);
    }
    span:nth-child(2) {
      opacity: 0;
    }
    span:nth-child(3) {
      top: 15px;
      transform: rotate(-45deg);
    }
  }
  
}

.menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 0;
  background: fade-out(#000,0.05);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  list-style-type: none;

  li {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
  a {
    color: #fff;
    font-size: 3em;
    font-weight: bold;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
    &:hover {
      color: #1abc9c;
    }
  }
}
.menu.visible {
  display: flex;
}




















            
          
!
            
              $(function(){
    var flag = 0;
    $('.menu-icon').on('click', function(e){
      e.preventDefault();
      if(flag == 0 ){
        $('.menu-icon').addClass("active");
        $('.menu').addClass('visible'); 
        flag = 1;
      }else {
        $('.menu-icon').removeClass("active");
        $('.menu').removeClass('visible');
        flag = 0;
      }
   });
});
            
          
!
999px
Loading ..................

Console