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.

            
                  <nav class="navbar navbar-expand-md navbar-dark bg-fade fixed-top">
      <a class="navbar-brand" href="#">Navbar</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <div class="collapse navbar-collapse" id="navbarsExampleDefault">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item active">
            <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">Link</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">link 2</a>
          </li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="http://example.com" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
            <div class="dropdown-menu" aria-labelledby="dropdown01">
              <a class="dropdown-item" href="#">Action</a>
              <a class="dropdown-item" href="#">Another action</a>
              <a class="dropdown-item" href="#">Something else here</a>
            </div>
          </li>
        </ul>
        <form class="form-inline my-2 my-lg-0">
          <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
          <button class="btn btn-success my-2 my-sm-0" type="submit">Search</button>
        </form>
      </div>
    </nav>
<div class="jumbotron jumbotron-fluid">
  <div class="container">
    <h1 class="display-3">Fluid jumbotron</h1>
    <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
  </div>
</div>
<section class="module parallax parallax-1" data-type="background" data-speed="10">
  <div class="parallax-container">
    <h1>Motion</h1>
  </div>
</section>

<section  class="module content">
  <div class="parallax-container">
    <h2>Lorem Ipsum Dolor</h2>
    <p>Lorem ipsum dolor...</p>
  </div>
</section>

<section class="module parallax parallax-2" data-type="background" data-speed="10">
  <div class="parallax-container">
    <h1>Shape</h1>
  </div>
</section>

<section class="module content">
  <div class="parallax-container">
    <h2>Lorem Ipsum Dolor</h2>
    <p>Lorem ipsum dolor...</p>
  </div>
</section>

<section class="module parallax parallax-3" data-type="background" data-speed="10">
  <div class="parallax-container">
    <h1>Color</h1>
  </div>
</section>

<section class="module content">
  <div class="parallax-container">
    <h2>Lorem Ipsum Dolor</h2>
    <p>Lorem ipsum dolor...</p>
  </div>
</section>
    <footer class="footer"> 
      <div class="container-fluid bg-primary">
        <div class="row">
          <div class="col-xs-6 col-md-4 left">
    <p>&copy; MySite.com</p>
        </div>
          <div class="col-xs-6 col-md-4 left">
    <a href="#">Terms &amp;Conditions</a>
    <a href="#">About Us</a> 
        </div>
          <div class="col-xs-6 col-md-4 right">
    <a href="#" class="btn btn-social-icon btn-twitter">
    <span class="fa fa-twitter"></span>
  </a>
   <a href="#" class="btn btn-social-icon btn-facebook">
    <span class="fa fa-facebook"></span>
  </a>
        <a href="#" class="btn btn-social-icon btn-instagram">
    <span class="fa fa-instagram"></span>
  </a>
        </div>
        </div>
</div>
    </footer>

            
          
!
            
              html {
  position: relative;
  min-height: 100%;
}
body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.jumbotron {
  background-image: url("https://www.smak.co.za/images/bg.jpg");
  background-size: 100% 100%;
  color: #b0bec5;
  margin-bottom: 0;
}
.navbar-scroll {
  background-color: rgba(0,123,255,0.4);
  transition: background-color 0.5s;
}
@media(max-width: 768px){
    .navbar {background-color: #007bff !important; }
}
/* ============================================================
  PRIMARY STRUCTURE
============================================================ */
.parallax-container {
  max-width: 960px;
  margin: 0 auto;
}

/* ============================================================
  SECTIONS
============================================================ */
section.module:last-child {
  margin-bottom: 0;
}
section.module h2 {
  margin-bottom: 40px;
  font-family: "Roboto Slab", serif;
  font-size: 30px;
}
section.module p {
  margin-bottom: 40px;
  font-size: 16px;
  font-weight: 300;
}
section.module p:last-child {
  margin-bottom: 0;
}
section.module.content {
  padding: 40px 0;
  background-color: rgba(207,216,220,0.5);
}
section.module.content:last-child {
  margin-bottom: 60px;
}
section.module.parallax {
  padding: 240px 0;
  background-position: 0 0;
}
section.module.parallax h1 {
  color: #1e1e1e;
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 10px white;
}
section.module.parallax-1 {
  background-image: url("https://i.ytimg.com/vi/SwOaV-pzGcA/maxresdefault.jpg");
  background-position: 50% 0;
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: cover;
  background-color: rgba(0,123,255,0.4);
  background-blend-mode: screen;
}
section.module.parallax-2 {
  background-image: url("http://www.planwallpaper.com/static/images/Fall-Nature-Background-Pictures.jpg");
  background-position: 50% 0;
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: cover;
  background-color: rgba(0,123,255,0.4);
  background-blend-mode: screen;
}
section.module.parallax-3 {
  background-image: url("http://www.psd-dude.com/tutorials/resources-images/free-rain-and-raindrop-textures-for-photoshop/raindrops-window-background.jpg");
  background-position: 50% 0;
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: cover;
  background-color: rgba(0,123,255,0.4);
  background-blend-mode: screen;
}

@media all and (min-width: 600px) {
  section.module h2 {
    font-size: 42px;
  }
  section.module p {
    font-size: 20px;
  }
  section.module.parallax {
    padding: 300px 0;
  }
  section.module.parallax h1 {
    font-size: 96px;
  }
}
@media all and (min-width: 960px) {
  section.module.parallax h1 {
    font-size: 160px;
  }
}
/*footer*/
.footer .container-fluid {
  height: auto;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  line-height: 60px;
}
footer .container-fluid a {
  display: inline-block;
  color: #ddd;
  padding-left: 1em;
 
}
footer .container-fluid p {
  display: inline-block;
  color: #ddd;
  padding-left: 1em;
  padding-right: 2em;
}
@media(max-width: 768px){
    .col-md-4 {
      text-align: center;
      line-height: 30px;
  }
}
.right {
  text-align: right;
}
.center {
  text-align: center;
}
.left {
  text-align: left;
}
            
          
!
            
              //parallax js
$(document).ready(function(){
  var $window = $(window);
    $('section[data-type="background"]').each(function(){
        var $bgobj = $(this); // assigning the object
    
        $(window).scroll(function() {
            var yPos = -($window.scrollTop() / $bgobj.data('speed')); 
            
            // Put together our final background position
            var coords = '50% '+ yPos + 'px';

            // Move the background
            $bgobj.css({ backgroundPosition: coords });
        }); 
    });    
});

//menu transition js
$(document).ready(function(){
  $(window).scroll(function(){
  	var scroll = $(window).scrollTop();
    	  if (scroll > 0) {
	    $(".navbar").addClass("navbar-scroll");
        }
    	  else{
		  $(".navbar").removeClass("navbar-scroll");  	
	  }
	  if (scroll > 200) {
	    $(".navbar").addClass("bg-primary");
	  }

	  else{
		  $(".navbar").removeClass("bg-primary");  	
	  }
  })
})



            
          
!
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