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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <header class="navbar-wrapper" role="banner">
  <div class="container">
  <div class="navbar navbar-inverse">
    <div class="navbar-header">
      <button class="navbar-toggle" data-toggle="collapse" data-target=".bs-navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="#" class="goto navbar-brand">Menu Bar</a>
    </div>
    <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
      <ul class="nav navbar-nav">
        <li>
          <a href="">Item 1</a>
        </li>
        <li>
          <a href="">Item 2</a>
        </li>
        <li>
          <a href="">Item 3</a>
        </li>
        <li>
          <a href="">Item 4</a>
        </li>
        <li>
          <a href="">Item 5</a>
        </li>
      </ul>
    </nav>
    </div></div>
</header>
<div id="scroll-wrap">
  <section id="section-1" class="fill-viewport">
    <div class="container">
      <div class="row">
        <div class='col-md-12 welcome-div'>
          <h2>Welcome Div</h2>
          <p>This even works on all mobiles I've tested! Go on try it...</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
      </div>
    </div>
  </section>
  <section class="container">
    <div class="row">
      <div class="col-md-12">
        <h2>App Dev text section</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
    </div>
  </section>
  <section class="container">
    <div class="row">
      <div class="col-md-12">
        <h2>App Dev text section</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
    </div>
  </section>
  <section class="container">
    <div class="row">
      <div class="col-md-12">
        <h2>App Dev text section</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
    </div>
  </section>
  <section class="container">
    <div class="row">
      <div class="col-md-12">
        <h2>App Dev text section</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
    </div>
  </section>
  <section class="container">
    <div class="row">
      <div class="col-md-12">
        <h2>App Dev text section</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div>
    </div>
  </section>
</div>
            
          
!
            
              @import compass

$nav-background-transition: 1s
section.fill-viewport
  height: 800px
#section-1
  width: 100%
  background: #0b486b
  padding: 40px 0 30px 0
  display: table
  color: white
  z-index: 200
  div.welcome-div
    height: 100%
    text-align: cente
header.navbar-wrapper
  @media (max-width: 768px)
    margin: 0
    .container
      padding: 0
  margin-top: 15px
  z-index: 300
  .navbar-toggle
    margin: 8px 15px
  .navbar
    padding: 0px 12px
  @media (min-width: 768px)
    .navbar-collapse
      float: right

@media(min-width: 768px) and (max-width: 992px)
  .navbar-collapse
    padding: 0

#scroll-wrap
  position: absolute
  top: 0
  left: 0
  right: 0
header
  left: 0
  right: 0
  &.affix-top
    position: absolute
    top: 400px
  &.affix
    position: fixed
    top: 0px !important
    
  
@media (max-width: 768px)
  #scroll-wrap
    bottom: 0
    top: 52px
    overflow: scroll
    -webkit-overflow-scrolling: touch
  header
    position: absolute !important
    top: 0px !important
    right: 0
    left: 0
    z-index: 600
    .navbar
      margin-bottom: 0px !important
            
          
!
            
              $(document).ready ->
  $('header').affix
    offset:
      top: -> 400
            
          
!
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.

Console