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.

              <nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      <a class="navbar-brand" href="#">Start Bootstrap</a>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
          <a href="#">About</a>
          <a href="#">Services</a>
          <a href="#">Portfolio</a>
          <a href="#">Contact</a>
    <!-- /.navbar-collapse -->
  <!-- /.container -->

<!-- Demo Header -->
  <h1>Bootstrap Collapsing Animated Navigation</h1>
              /* Collapsing Navbar Styles */

@media(min-width:768px) {
  .navbar-default {
    -webkit-transition: all .35s;
    -moz-transition: all .35s;
    transition: all .35s;
    padding: 15px 0;
    /* Add additional styles here for the UNCOLLAPSED state */
  .navbar-default.affix {
    padding: 0;
    /* Add additional styles here for the COLLAPSED state */

/* Header Styles for Demo */

header {
  padding: 300px;
  text-align: center;
  background-image: url(https://unsplash.it/800?image=974
  background-position: center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
  -o-background-size: cover;

header h1 {
  color: white;
  font-size: 2em;
              // Initialize affix and add an offset to add affix class on scroll
  offset: {
    top: 100
Loading ..................