css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              input#navToggle(type="checkbox")
.wrapper
  nav.navContent
    .navToggle
      label.navToggleBtn(for="navToggle")
        span.bar.barTop
        span.bar.middle
        span.bar.barBottom
      
    .navigation
      ul
        li
          a(href="#") NAVIGATION 01
        li
          a(href="#") NAVIGATION 02
        li
          a(href="#") NAVIGATION 03
        li
          a(href="#") NAVIGATION 04
        li
          a(href="#") NAVIGATION 05
        li
          a(href="#") NAVIGATION 06
        li
          a(href="#") NAVIGATION 07
  main#main
    .content
      p Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.
      p Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus.
      p Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna.
      p Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum.
      p Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac

            
          
!
            
              body
  margin: 0
  padding: 0
  &.fixed
    height: 100%
    width: 100%
    overflow: hidden

 a
   color: #f0810f
   transition: all .25s
   &:hover
     color: #f0810f - 30
  
.wrapper
  background-color: #bcbabe

#main
  margin: 0 auto
  padding: 2.5em 1.5em 3em
  background-color: #fff
  max-width: 48em
  box-sizing: border-box

.navToggle
  position: relative
  margin: 0 auto
  width: 48em
  
.navigation
  text-align: center
  width: 0
  height: 0
  transform: scale(.8)
  transition: transform .25s
  ul
    display: none
    list-style: none
    margin: 0
    padding: 0
  li
    padding: 2em 0
  a
    font-size: 200%
    text-decoration: none
.navToggleBtn
  position: absolute
  top: 0
  left: 0
  display: block
  padding: 8px 0 0
  background-color: #a1d6e2
  border: 0 solid transparent
  border-radius: 0
  width: 40px
  height: 40px
  box-sizing: border-box
  transition: all .3s
  &:hover
    background-color: #a1d6e2 + 20
  .bar
    display: block
    margin: 2px auto
    background: #2a3132
    height: 5px
    width: 30px
    transition: all .3s
  .middle
    opacity: 1
  
#navToggle
  position: absolute

#navToggle:checked + .wrapper    
  .navContent
    position: fixed
    top: 0 // <- need
    bottom: 0 // <- need   
    left: 0
    right: 0
    overflow-y: auto // <- need
    overflow-x: hidden
    width: 100%
    min-height: 100%
  .navigation
    display: block
    background-color: rgba(1, 26, 39, .85)
    width: 100%
    height: auto
    min-height: 100%
    transform: scale(1)
    z-index: 10
    ul
      display: block
      padding-top: 60px
      
  .navToggleBtn
    position: absolute
    top: 10px
    border-width: 3px
    border-color: #f0810f - 50
    border-radius: 50%
    background-color: transparent
    z-index: 11
    &:hover
      border-color: #f0810f
      .bar
        background-color: #f0810f
    .barTop
    .barBottom
      position: absolute
      top: 50%
      left: 0
      right: 0
      margin-top: -2px
      background-color: #f0810f - 50
      height: 3px
      width: 24px
    .barTop
      transform: rotate(45deg)
    .barBottom
      transform: rotate(-45deg)
    .middle
      opacity: 0
            
          
!
            
              $(function(){
  var $body = $('body'),
      $toggele = $('#navToggle');
  $toggele.on('change', function(evt) {
    var v = $toggele.prop('checked'),
        fixed = 'fixed';
    if(v) {
      $body.addClass(fixed);
    } else {
      $body.removeClass(fixed);
    }
    return;
  });
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console