123

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.

            
              nav
  ul
    each val in ['home','journey','about','store','contact']
      li= val
  button.is-closed
  
article
  h1 how approvals can be tigers
  
  p In recent years, the talk of a flame becomes an ortho rise. Authors often misinterpret the uncle as a hydric butter, when in actuality it feels more like a scungy plywood. Before literatures, accelerators were only indices. This could be, or perhaps a feeling is the house of a market.

  p Few can name a drifty flesh that isn't a tubate sea. Some posit the added fisherman to be less than deictic. In recent years, some plodding winters are thought of simply as riverbeds. We know that the turkishes could be said to resemble juicy outriggers.

  p Extending this logic, stretchy moles show us how approvals can be tigers. Framed in a different way, the weekly discovery comes from a seismic men. Those parties are nothing more than waiters. A halting eight without farms is truly a nancy of unmade moustaches.
  
  p Honest cheetahs show us how toenails can be kidneies. Extending this logic, a gadrooned toothbrush is a snowplow of the mind. The talking maria reveals itself as a shieldless clipper to those who look. Their wire was, in this moment, a displayed cello.

  p A kitten can hardly be considered an amused slipper without also being a banker. A narcissus of the Wednesday is assumed to be a diglot vision. The trombone is a palm. Far from the truth, few can name a thriftless payment that isn't a brilliant t-shirt.

  p A religion of the snail is assumed to be a plumose math. Before bolts, folds were only congos. We can assume that any instance of a recorder can be construed as a roomy novel. Some sliest layers are thought of simply as enquiries.

  p The death is a tire. We can assume that any instance of an arm can be construed as an undubbed stocking. The tailing distance comes from a stripeless appendix. Authors often misinterpret the nephew as a tangy stepmother, when in actuality it feels more like a juiceless puffin.

  p A text sees a park as a shotten beam. A ferryboat can hardly be considered a bristly mark without also being a smash. It's an undeniable fact, really; a shield is a bespoke woman. Extending this logic, a yoke is a droopy love.

  p Authors often misinterpret the giant as a chasmal step-grandmother, when in actuality it feels more like an able sign. It's an undeniable fact, really; they were lost without the squally jar that composed their swordfish. Before snowstorms, treatments were only undershirts. Extending this logic, the unfished television reveals itself as a connate september to those who look.
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Enriqueta:400,700);

$font: 'Enriqueta', serif;

$gray: #D7F1EA;
$green: #39BA96;
$black: #3d3d3d;

$color-body: $black;
$bg-body: $gray;
$bg-menu: $black;

$padding: 24px;

* {
  box-sizing: border-box;
}

body {
  font-family: $font;
  color: $color-body;
  background-color: $bg-body;
  &.is-open {
    overflow: hidden;
  }
}

h1 {
  margin-bottom: 36px;
  font-size: 50px;
  line-height: 1.1;
  text-transform: capitalize;
}

p {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 24px;
}

article {
  margin: auto;
  padding: 100px $padding;
  width: 100%;
  max-width: 800px;
  transition: transform 0s ease-out;
  z-index: 2;
  .is-open & {
    opacity: 0;
    transform: scale(0.9) rotate(4deg);
    transition:
      opacity 20s linear,
      transform 50s ease-out;
  }
}

nav {
  position: fixed;
  padding: 24px;
  width: 100%;
  height: 0;
  transform: translateZ(0);
  transition:
    background-color .4s ease-out,
    height 0s .4s;
  .is-open & {
    height: 100%;
    background-color: rgba(white, 0.9);
    transition: background-color 2s ease-out;
    z-index: 2;
  }
}

ul {
  position: absolute;
  top: $padding;
  left: $padding;
  font-size: 30px;
  text-transform: capitalize;
  color: $bg-menu;
  transform-origin: 0 0;
  transform: scale(0.1);
  transition: transform .2s ease-out;
  z-index: 2;
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  li {
    display: none;
    clear: both;
    float: left;
    margin: 0 0 48px;
    padding: 0 60px;
    background-color: $bg-menu;
    cursor: pointer;
    user-select: none;
    transition: 
      background-color 0s .2s ease-out,
      margin .2s ease-out,
      padding .2s ease-out,
      opacity .2s ease-out;
    &:after {
      content: "";
      position: absolute;
      bottom: 0; left: 0;
      height: 4px;
      width: 0;
      background-color: darken($green, 20%);
      transition: width .2s ease-out;
    }
    &:nth-child(n+3) {
      display: block;
    }
    @for $i from 1 through 5 {
      &:nth-child(#{$i}) {
        animation: bounce-out .2s ease-out;
      }
    }
    &:hover {
      color: darken($green, 20%);
      &:after {
        width: 100%;
      }
    }
  }
  .is-open & {
    transform: 
      translateY($padding + 6px)
      scale(1);
    li {
      display: block;
      padding: 12px 0;
      margin: 0;
      background-color: transparent;
      transform: scale(0.6);
      transition: 
        background-color 0s ease-out,
        margin .2s ease-out,
        padding .2s ease-out,
        opacity .2s ease-out;
      @for $i from 1 through 5 {
        &:nth-child(#{$i}) {
          animation: bounce-in 1s $i * .04s ease-out forwards;
        }
      }
    }
  }
}

button {
  position: absolute;
  top: $padding;
  left: $padding;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease-out;
  z-index: 3;
  &:before, &:after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    margin: auto;
    width: 3px;
    height: 100%;
    background-color: $bg-menu;
  }
  &:before {
    transform: rotate(45deg);
  }
  &:after {
    transform: rotate(-45deg);
  }
  .is-open & {
    opacity: 1;
    transform: rotate(360deg);
    transition: opacity .2s .1s ease-out,
      transform .4s .1s ease-out;
  }
}

@keyframes bounce-in {
  0% {
    transform: scale(0.8);
  }
  20% {
    transform: scale(1.1);
  }
  40% {
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.05);
  }
  80% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}
            
          
!
            
              var bod = $('body');
var tog = $('button');

tog.on("click", function() {
  $(this).toggleClass('is-closed');
  if(!$(this).hasClass('is-closed')) {
      bod.addClass('is-open');
  } else {
      bod.removeClass('is-open');
  }
});
            
          
!
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.

Console