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

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

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.

            
              
<h1>Horizontal Nav Sample</h1>

<nav class="nav-horizontal">
  <div class="mask">
    <ul class="list">
      <li><a href="#">Alpha</a></li>
      <li><a href="#">Beta</a></li>
      <li><a href="#">Gamma</a></li>
      <li><a href="#">Delta</a></li>
      <li><a href="#">Epsilon</a></li>
      <li><a href="#">Zeta</a></li>
      <li><a href="#">Eta</a></li>
      <li><a href="#">Theta</a></li>
      <li><a href="#">Iota</a></li>
      <li><a href="#">Kappa</a></li>
      <li><a href="#">Lambda</a></li>
      <li><a href="#">Mu</a></li>
      <li><a href="#">Nu</a></li>
      <li><a href="#">Xi</a></li>
    </ul>
  </div>
</nav>

<p>Lorem ipsum dolor sit amet, probo senserit molestiae ut quo, odio vide ipsum per id. Quo eius ignota id, an usu dolorem ancillae, ius autem ponderum ut. In doctus fuisset persecuti eam, assueverit sadipscing pro ut. In malis moderatius duo.</p>

            
          
!
            
              h1, p {
  margin: 20px;
  color: #666;
  line-height: 1.75em;
}

.nav-horizontal {
  background-color: #fff;
  overflow: hidden;
  height: 3em;
  width: 100%;
  
  .mask {
    height: 5em;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .list {
    display: inline-table;
    margin: 0 auto;
    max-width: 100%;
    
    li {
    display: table-cell;
    }

    a {
      display: block;
      padding: 0 1em;
      text-decoration: none;
      color: #333;
      height: 3em;
      line-height: 3;
      &:hover {
        border-bottom: 2px solid black;
        background-color: #f9f9f9;
      }
    }
  }
}



//codepen用 reset
*{box-sizing: border-box;}body{font-family:sans-serif;padding-top: 100px;width:100vw;background-color:#999;}
            
          
!
999px
Loading ..................

Console