Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

              
                <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>
              
            
!

CSS

              
                @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
              
            
!

JS

              
                
              
            
!
999px

Console