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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              <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>
            
          
!
            
              .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-trigger').on('click', function() {
  $(this).toggleClass('menu__trigger--active');
	$('.js-menu').slideToggle('fast');
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console