Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML

              
                section.not
  ul.not__nav
    li
      i.material-icons fingerprint
      a(href="#") log-in
    li
      i.material-icons face
      a(href="#") clients
    li
      i.material-icons favorite
      a(href="#") favorites
    li.is-active
      i.material-icons accessibility
      a(href="#") news
        ul.not__nav-sub
          li
            i.material-icons remove_red_eye
            span 12
          li
            i.material-icons comment
            span 33
          li
            i.material-icons account_circle
            span 22
    li
      i.material-icons find_in_page
      a(href="#") search      
              
            
!

CSS

              
                $blue: rgb(26,36,56);
$gold: rgb(247, 230, 183);
$offwhite: rgb(229, 229, 229);
$dark: rgb(22,22,22);

body{
  font-family: 'Robot', sans-serif;
  margin: 50px;
  -webkit-font-smoothing: antialiased;
}

.not{
  background: $offwhite;
  margin: 0px auto;
  min-height: 60vh;
  padding: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 50px;
  
  &__nav{
    display:flex;
    background: $blue;
    color: $gold;
    list-style-type: none;
    box-shadow: 0px 20px 30px -5px rgba($dark, 0.5);
    border-radius: 3px;
    & > li{
      display: flex;
      justify-content: center;
      flex-grow: 1;
      padding: 10px 20px;
      height: 30px;
      width: 80px;
      font-size: 12px;
      cursor: pointer;
      position:relative;
      transition: all 400ms ease-in-out;
      perspective: 1000px;
      
      & i{
        color: rgba($gold, 0.7);
        font-size: 22px;
      }
      
      & a {
        text-decoration: none;
        color: $gold;
        position: absolute;
        top:65%;
        left: 50%;
        transform: translateX(-50%);
        
      }
      &:hover{
        background:lighten($blue, 10%);
      }
      
      &.is-active{
        box-shadow: 0px -2px 0px $gold inset;
        background: lighten($blue, 10%);
        .not__nav-sub{
          display: flex;
          animation: flag 1000ms cubic-bezier(0.92,-0.54, 0, 1.85) forwards;
          transform-origin: center 70px;
          transform-style: preserve-3D;
          
          @keyframes flag{
            0%{
              opacity:0;
              transform: scale(0.1) rotate(60deg) translateY(60px) rotateX(150deg);
            }
            50%{
            transform: rotate(-10deg) rotateX(-2deg);
            opacity: 1;
            }
            70%{
            transform: rotate(3deg);
            }
            100%{
              transform: scale(1);
            }
          }
        }
      }
    }
    
    &-sub{
      background:lighten($blue, 10%);
      position: absolute;
      list-style-type: none;
      border-radius: 3px;
      padding: 0px 10px;
      bottom: 380%;
      left: -160%;
      color:#fff;
      display: none;
      
      &:after{
        top: 100%;
        left: 50%;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
        border-color: rgba(0, 151, 167, 0);
        border-top-color:lighten($blue, 10%);
        border-width: 6px;
        margin-left: -6px;
        

      }
      
      & i{
        color: #fff !important;
        padding:5px 10px;
        font-size: 14px !important;
      }
      
      & span{
        padding: 1px 10px;
      }
      
    }
  }
}
              
            
!

JS

              
                $('.not__nav li').on('click', function(){
  $(this).addClass('is-active').siblings().removeClass('is-active');
});
              
            
!
999px

Console