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

              
                <div class="menu cf">
  <a href="#" class="menu__trigger js-trigger">
    <i class="ion-navicon-round"></i>
  </a>
  
  <ul class="menu__row">
    <li class="menu__list">
      <a href="#" class="menu__link">About</a>
    </li>
    
    <li class="menu__list">
      <a href="#" class="menu__link">Blog</a>
    </li>
    
    <li class="menu__list">
      <a href="#" class="menu__link">Contact</a>
    </li>
  </ul>
  
  <div class="menu__dropdown cf js-menu">
    <div class="menu__col">
      <h2>First Random Title</h2>
      <p>Lorem ipsum dolor sit amet, nam in omnesque oporteat instructior, ut mea euismod maiorum omnesque. In eum mutat iriure, vel id aeque libris impedit, dicat liber duo ne. Equidem torquatos ex vix, et quo vocent mediocritatem, usu ex ubique electram conclusionemque. Mel id saepe veniam rationibus, audiam adipiscing ei ius. Quis ferri reprehendunt ex vel, ad aliquip aperiam recteque vim, ei debitis appetere signiferumque pri.</p>
    </div>
    
    <div class="menu__col">
      <h2>Second Random Title</h2>
      <p><p>Lorem ipsum dolor sit amet, nam in omnesque oporteat instructior, ut mea euismod maiorum omnesque. In eum mutat iriure, vel id aeque libris impedit, dicat liber duo ne. Equidem torquatos ex vix, et quo vocent mediocritatem, usu ex ubique electram conclusionemque. Mel id saepe veniam rationibus, audiam adipiscing ei ius. Quis ferri reprehendunt ex vel, ad aliquip aperiam recteque vim, ei debitis appetere signiferumque pri.</p></p>
    </div>
    
    <div class="menu__col">
      <h2>The third and last random title</h2>
      <p><p>Lorem ipsum dolor sit amet, nam in omnesque oporteat instructior, ut mea euismod maiorum omnesque. In eum mutat iriure, vel id aeque libris impedit, dicat liber duo ne. Equidem torquatos ex vix, et quo vocent mediocritatem, usu ex ubique electram conclusionemque. Mel id saepe veniam rationibus, audiam adipiscing ei ius. Quis ferri reprehendunt ex vel, ad aliquip aperiam recteque vim, ei debitis appetere signiferumque pri.</p></p>
    </div>
  </div>
</div>
              
            
!

CSS

              
                .menu {
  background: #0B2027;
}

.menu__trigger {
  background: #16414f;
  float: left;
  padding: 1.3rem 0;
  width: 10%;
  text-align: center;
  color: white;
  font-size: 1.5rem;
  -webkit-transition: .3s;
          transition: .3s;
}
@media (min-width: 30em) and (max-width: 40em) {
  .menu__trigger {
    width: 15%;
  }
}
@media (max-width: 30em) {
  .menu__trigger {
    width: 15%;
  }
}

.menu__trigger--active {
  background: salmon;
}

.menu__row {
  width: 90%;
  font-size: 0;
}

.menu__list {
  display: inline-block;
  vertical-align: bottom;
  font-size: 1.2rem;
}

.menu__link {
  display: block;
  text-decoration: none;
  padding: 1.5rem;
  color: white;
  font-weight: 500;
  -webkit-transition: .3s;
          transition: .3s;
}
@media (max-width: 30em) {
  .menu__link {
    padding: 1.5rem 0.6rem;
  }
}
.menu__link:hover {
  background: #16414f;
}

.menu__dropdown {
  padding: 1.6rem 0;
  background: salmon;
  display: none;
}

.menu__col {
  width: 33.333%;
  float: left;
  padding: 2.5rem 1.5rem;
}
@media (min-width: 40em) and (max-width: 50em) {
  .menu__col {
    width: 100%;
  }
}
@media (min-width: 30em) and (max-width: 40em) {
  .menu__col {
    width: 100%;
  }
}
@media (max-width: 30em) {
  .menu__col {
    width: 100%;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Raleway";
}

.cf:after {
  content: "";
  display: table;
  clear: both;
}

h2 {
  color: white;
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 2vh;
}

p {
  line-height: 1.5;
  color: #fafafa;
  font-weight: 500;
}

              
            
!

JS

              
                $('.js-trigger').on('click', function() {
  $(this).toggleClass('menu__trigger--active');
	$('.js-menu').slideToggle('fast');
});
              
            
!
999px

Console