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 id="frame">
  <h1>Toogle navigation with pure css</h1>
  <input id="toggleNavigation" type="checkbox">
  <label for="toggleNavigation">+</label>
  <ul>
    <li class="item"><a href="#" class="brandico-wordpress">Wordpress</a>
    <li class="item"><a href="#" class="brandico-github">Github</a>
    <li class="item"><a href="#" class="brandico-twitter-bird">Twitter</a>
    <li class="item"><a href="#" class="brandico-lastfm">LastFM</a>
    <li class="item"><a href="#" class="brandico-googleplus-rect">Google plus</a>
  </ul>
</div>

            
          
!

CSS

            
              @import "compass/css3";

@import url(http://weloveiconfonts.com/api/?family=brandico);

/* brandico */
[class*="brandico-"]:before {
  font-family: 'brandico', sans-serif;
}

* {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}

/*
 * Styles for nicer codepen presentation
 */
body {
  background: #f6f1eb;
  @include background-image(radial-gradient(center, ellipse cover,  #ffffff 0%, #ffffff 26%, #f5f5f5 59%, #f5f5f5 77%, #cecece 100%));
}

h1 {
  font-family: sans-serif;
  text-align: center;
  font-size: 24px;
  color: #cc2701;
  text-shadow: 0 2px 2px #111;
}

/*
 * Actual navigation styles
 */

// variables
// z-index
$z-item: 0;
$z-checkbox: 1;
$z-label: 2;

$middleIndex : 3;
$numberOfItems : 5;

#frame {
  position: absolute;
  
  top: 50%;
  left: 50%;
  
  width: 250px;
  height: 250px;
  
  margin: -125px 0 0 -125px;
  
  background: no-repeat center;
  background-size: 100% auto;

  .item {
    position: absolute;
    
    top: 0;
    left: 0;
    
    width: 40px;
    height: 40px;
    
    opacity: 0;
    
    border-radius: 50%;
    
    background-color: #888;
    
    @include background-image(radial-gradient(40px 40px, #333 5px, #111 25px));
    @include simple-transform( 1, 0, 0, 0, 0, 0, 20px, 0 );
    @include box-shadow( 0 3px 2px #666 );
    
    z-index: $z-item;
    
    &:active {
      @include box-shadow( 0 0 0 #666 );
    }
    
    &:hover {
      @include background-image(radial-gradient(40px 40px, #777 5px, #444 25px));
    }
    
    @for $i from 1 through $numberOfItems {
      $delay : $i - $middleIndex;
        
      @if $i - 3 < 0 {
        $delay : ($i - 3) * -1;
      }      

      &:nth-child(#{$i}) {
        @include transition(
          transform 0.5s ease-in 0.1s + 0.1s * $delay,
          opacity 0.5s ease-in 0.1s + 0.1s * $delay
        );
      }
    }
  }
  
  a {
    position: relative;
    
    color: #fff;
    text-decoration: none;
    line-height: 100%;
    
    display: block;
    
    width: 100%;
    height: 0;
    padding-top: 100%;
    
    overflow: hidden;
    
    &:before {
      position: absolute;
      
      left: 0;
      top: 0;
       
      width: 40px;
      height: 40px;
      
      line-height: 40px;;
      
      font-size: 20px;
      text-align: center;
    }
  }
  
  input[type=checkbox] {
    position: absolute;
    
    top: 50%;
    left: 50%;
    margin: -20px 0 0 -20px;
    
    width : 40px;
    height: 40px;
    
    z-index: $z-checkbox;
    
    &:checked {
      + label {
        background-color: #888;
        @include background-image(radial-gradient(50px 50px, #777 0%, #bbb 100%)); 
        
        @include box-shadow( inset 0 2px 3px #444 );
        
        &:hover {
          background-color: #777;
          @include background-image(radial-gradient(50px 50px, #666 0%, #aaa 100%)); 
        }
      }
      
      ~ ul {
        .item {
          position: absolute;
          opacity: 1;
          
          @for $i from 1 through $numberOfItems {
            $angle : ($i - $middleIndex) * 30deg;    

            &:nth-child(#{$i}) {
              @include simple-transform( 1, $angle, 0, 150%, 0, 0, 20px, 0 );
            }
          }
        }
      }
    }
    
    + label {
      position: absolute;
      
      left: 50%;
      top: 50%;
      
      width: 52px;
      height: 52px;
      
      margin: -26px 0 0 -26px;
      padding: 0;
      
      font-size: 46px;
      font-weight: 800;
      
      line-height: 42px;
      
      text-align: center;
      color: #fff;
      
      cursor: pointer;
      
      background-color: red;
      @include background-image(radial-gradient(50px 50px, #ac0701 0%, #f46a4b 100%)); 
      
      border-radius: 50%;
      border: 2px solid #fff;
      
      @include box-shadow( 0 2px 4px #333 );     
      @include transition( all 0.5s ease-in );
      
      z-index: $z-label;
      
      &:hover {
        @include background-image(radial-gradient(50px 50px, #dc0701 0%, #f49a7b 100%)); 
      }
    }
    
    ~ ul {
      position: absolute;
      left: 50%;
      top: 50%;
      margin: -20px 0 0 -20px;
      list-style: none;
      padding: 0;
    }
  }
}
            
          
!

JS

            
              /* No, no, no! No, no, no! No, no, no! No, no, JavaScript! */
            
          
!
999px

Console