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.

            
              <div class="logo">
  <h1>3D Menu</h1>
</div>
<div class="menu_wrapper">
  <nav>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">Services</a>
        <ul>
          <li><a href="#"><h3>Service Page One</h3></a>
            <div>Some additional content</div>
          </li>
          <li><a href="#"><h3>Service Page Two</h3></a>
            <div>Some additional content</div>
          </li>
          <li><a href="#"><h3>Service Page Three</h3></a>
            <div>Some additional content</div>
          </li>
        </ul>
      </li>
      <li><a href="#">About</a>
        <ul>
          <li><a href="#"><h3>About Page One</h3></a>
            <div>Some additional content</div>
          </li>
          <li><a href="#"><h3>About Page Two</h3></a>
            <div>Some additional content</div>
          </li>
        </ul>
      </li>
      <li><a href="#">Contact</a></li>
    </ul>
  </nav>
</div>
            
          
!
            
              @import compass

// Author: Daniel Peterson @dpidan
// codepen.io/dpidan
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro|Oswald:300)

body
  font: 14px/120% 'Source Sans Pro', sans-serif
  color: #999
  background: #111
  transition: all .2s

h1, h2, h3
  font-family: 'Oswald', 'Arial Narrow', sans-serif
    
.logo
  margin: 1em auto
  text-align: center
  h1
    font-size: 2em
    
.menu_wrapper
  padding: 1em
  perspective: 500px
    
nav
  width: 230px
  max-width: 360px
  margin: 0 auto
  transform-style: preserve-3d
  transform: rotateY(20deg) rotateX(36deg) rotateZ(-6deg)
  transition: transform 1s
  
  // Top-level
  > ul
    list-style: none
    padding: 1em
    transform: translateZ(-100px)
    transform-style: preserve-3d
    transition: all .2s
      
    > li
      margin: 0 0 .5em 0
      position: relative
      color: #222
      font-family: 'Oswald', 'Arial Narrow', sans-serif
      transition: all .2s
      transform-style: preserve-3d
      box-shadow: 5px 5px 20px rgba(0, 0, 0, .7)
      border-radius: 6px
      background-color: #ffac05 // Old browsers
      @include filter-gradient(#ffac05, #d96404, vertical) // IE6-9
      @include background-image(linear-gradient(top, #ffac05 0%,#d96404 100%))
        
      &:hover
        background: #fff
        transform: translateZ(16px) rotateY(4deg)
          
        a
          color: #222
        
        // 2nd-level (only on hover of parent)
        ul
          opacity: 1
          visibility: visible
          transform: translateZ(60px) rotateY(-25deg)
          
          li
            margin-left: .325em
            transition: all .4s
      
      a
        display: block
        padding: .5em
        min-height: 2.5em
        line-height: 2.5em
        color: #fff
        font-size: 1.5em
        text-decoration: none
        transition: all .2s
          
        &:hover
          color: #222

      // 2nd-level
      ul
        opacity: 0
        visibility: hidden
        position: absolute
        left: 83%
        top: 0
        padding-left: 2em
        min-width: 300px
        transition: all .2s
        transform: translateZ(-5px) rotateY(-10deg)
        
        li
          display: inline-block
          width: 45%
          margin: 0 0 .325em -3em
          box-shadow: 5px 5px 20px rgba(0, 0, 0, .7)
          transform-style: preserve-3d
          
          &:hover
            //background: #f92
          
          a
            color: #000
            font-size: 1.325em
            line-height: 120%
            background: #fff
            border-radius: 4px
            
            &:hover
              background: #f92
            
        div
          font-family: 'Source Sans Pro', sans-serif
          color: #ddd
            
          
!
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