cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              .container
 %nav
  %header
   %h1 Flat Vertical Navigation
  %ul
   %li
    %a{:href => "#"} 
     .fa.fa-home
     Home
   %li.sub-menu
    %a{:href => "#"} 
     .fa.fa-book
     About
     .fa.fa-angle-down.right
    %ul
     %li
      %a{:href => "#"} Our Team
     %li
      %a{:href => "#"} What We Do
   %li
    %a{:href => "#"}
     .fa.fa-file-text 
     Portfolio
   %li
    %a{:href => "#"} 
     .fa.fa-envelope
     Contact
  .info Cupcake ipsum dolor sit amet biscuit. Tootsie roll unerdwear.com powder tiramisu sugar plum marzipan cheesecake toffee wafer. Pie jelly icing bear claw gummies icing jelly beans pie halvah.
  %footer 
   %p Copyright &copy; AndyTran.me
            
          
!
            
              @green: #1abc9c;
@dark_green: #16a085;
@white: #fff;

body {
  background: #f7f7f7 url("https://33.media.tumblr.com/71be5cd5728e22354fc9dc389d5ab85b/tumblr_nb1uqjWny11st5lhmo1_1280.jpg") no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  font-family: "Open Sans";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  &::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    background: #fff; /* IE Fallback */
    background: rgba(255,255,255,.9);
    width: 100%;
    height: 100%;
  }
}

.container {
  position: relative;
  z-index: 1;
  background: #e7e7e7;
  max-width: 330px;
  margin: 0 auto;
}

nav {
  background: @white;
  width: 100%;
  & header {
    background: @dark_green;
    padding: 20px;
    & h1 {
      font-size: 16px;
      margin: 0;
      color: #fff;
      font-weight: 600;
      text-align: center;
      text-transform: uppercase;
    }
  }
  & ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: none;
    & li {
      display: block;
      background: @green;
      &.active {
        background: @white;
        & a {
          color: @green;
          border-left: 2px solid @green;
        }
        & ul {
          display: block;
        }
      }
      &:last-child {
        border-bottom: none;
      }
      & ul {
        display: none;
        & li {
          & a {
            background: @white;
            padding-left: 40px;
            color: @green;
            &:hover {
              padding-left: 45px;
            }
          }
        }
      }
      & a {
        display: block;
        padding: 10px 15px;
        color: #fff;
        text-decoration: none;
        transition: 0.2s linear;
        border-left: 2px solid transparent;
        &:hover {
          background: @white;
          padding-left: 20px;
          border-left: 2px solid @green;
          color: @green;
        }
      }
    }
  }
  & .info {
    background: @white;
    border-left: 2px solid @green;
    padding: 20px;
    color: #666;
    font-size: 14px;
  }
  & footer {
    background: @dark_green;
    padding: 15px 20px;
    color: #fff;
    & p {
      margin: 0;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
    }
  }
}

.right { float: right; }
.left { float: left; }
            
          
!
            
              $('.sub-menu a').click(function(){
  $(this).parent("li").children("ul").slideToggle('active');
});
            
          
!
999px
Loading ..................

Console