octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <nav role="full-horizontal">
    <ul>
        <li><a href="#">Stream</a></li>
        <li><a href="#">Lab</a></li>
        <li><a href="#">Projects</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
</nav>
            
          
!

CSS

            
              @import "compass/css3";

@import url(http://fonts.googleapis.com/css?family=Cantora+One);

* {
  box-sizing:border-box;   
}

html,
body {
    width:100%;
    height:100%;
}

body {
 background: url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/nasty_fabric.png);
 margin:.5em;
 font: 1em 'Cantora One', sans-serif;
}

nav[role="full-horizontal"] {
    width: 100%;
    
    ul {
      width:100%;
      list-style:none;
    
      > li {
        position:relative;
        float:left;
        padding:.25em 1em;
        margin:1.25em 1em;
    
        text-transform:uppercase;
        cursor:pointer;
        background:rgba(255, 255, 255, .8);
        text-align:center;
        border-radius:.75em;
        transition-duration: .3s;
        transition-timing-function: ease-in-out;
        transition-property: background, color, padding, border-radius;
        box-shadow:
          .1em -.1em 0 .1em rgba(0, 0, 0, .2),
          inset 0 0 0 .15em rgba(0, 0, 0, .4),
          -.1em .1em 0 .1em rgba(0, 0, 0, .2)
        ;
    
        &:after {
          position:absolute;
          z-index:-1;
          content:"";
          right:0;
          border-radius:50%;
          box-shadow:
            1em 1em 0 2em rgba(255, 255, 255, .5)
          ;
        }

        &:last-child:after {
           box-shadow:none;
        }
    
        &:hover {
            background-color:rgba(251, 93, 0, .8);
            padding-left:3em;
    
            > a {
              color:#fff;
            }
        }
    
        > a {
          color:#333;
          text-decoration:none;
          font-size: 1.4em;
          transition:color .3s ease-in-out;
        }
      }
    }
}

/* small screens */
@media screen and (max-width: 44em) {
  body {
    margin:1.5em 0;      
  }
    
  nav[role="full-horizontal"] {
    ul {
      padding:0 .5em;    
    }
    
    ul > li {
      width:100%;
      padding:.45em .25em;
      margin:0 0 .55em 0;
    
      &:after {
        box-shadow:none;  
      }
    }
  }
}
            
          
!

JS

            
               /**
  Full Horizontal
  
  # What? #
  Part of my "Responsive Menu Concepts" article on CSS-Tricks
  http://css-tricks.com/responsive-menu-concepts


  # 2012 by Tim Pietrusky
  # timpietrusky.com
**/
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console