Pen Settings

HTML

CSS

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

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

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.

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="hero">
  <div class="parallax-layer layer-6"></div>
  <div class="parallax-layer layer-5"></div>
  <div class="parallax-layer layer-4"></div>
  <div class="parallax-layer bike-1"></div>
  <div class="parallax-layer bike-2"></div>
  <div class="parallax-layer layer-3"></div>
  <div class="parallax-layer layer-2"></div>
  <div class="parallax-layer layer-1"></div>
</div>
              
            
!

CSS

              
                body {
  margin: 0px;
}

.hero {
  width: 100%;
  min-height: 450px;
  position: relative;
  top: 0;
  left: 0;
  background-color: #d9edfd;
}

.layer-1 {
  -webkit-animation: parallax_fg linear 20s infinite both;
  animation: parallax_fg linear 20s infinite both;
  background: url(http://imapo.ru/img/parallax/1.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 136px;
}

.layer-2 {
  -webkit-animation: parallax_fg linear 30s infinite both;
  animation: parallax_fg linear 30s infinite both;
  background: url(http://imapo.ru/img/parallax/2.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 145px;
}

.layer-3 {
  -webkit-animation: parallax_fg linear 55s infinite both;
  animation: parallax_fg linear 55s infinite both;
  background: url(http://imapo.ru/img/parallax/3.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 158px;
}

.layer-4 {
  -webkit-animation: parallax_fg linear 75s infinite both;
  animation: parallax_fg linear 75s infinite both;
  background: url(http://imapo.ru/img/parallax/4.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 468px;
}

.layer-5 {
  -webkit-animation: parallax_fg linear 95s infinite both;
  animation: parallax_fg linear 95s infinite both;
  background: url(http://imapo.ru/img/parallax/5.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 311px;
}

.layer-6 {
  -webkit-animation: parallax_fg linear 120s infinite both;
  animation: parallax_fg linear 120s infinite both;
  background: url(http://imapo.ru/img/parallax/6.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 222px;
}

.bike-1,
.bike-2 {
  background: url(http://imapo.ru/img/parallax/bike.png) 0 100% no-repeat;
  z-index: 1;
  position: absolute;
  bottom: 100px;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 75px;
}

.bike-1 {
  -webkit-animation: parallax_bike linear 10s infinite both;
  animation: parallax_bike linear 10s infinite both;
}

.bike-2 {
  -webkit-animation: parallax_bike linear 15s infinite both;
  animation: parallax_bike linear 15s infinite both;
}

@-webkit-keyframes parallax_fg {
  0% {
    background-position: 2765px 100%;
  }
  100% {
    background-position: 550px 100%;
  }
}

@keyframes parallax_fg {
  0% {
    background-position: 2765px 100%;
  }
  100% {
    background-position: 550px 100%;
  }
}

@-webkit-keyframes parallax_bike {
  0% {
    background-position: -300px 100%;
  }
  100% {
    background-position: 2000px 100%;
  }
}

@keyframes parallax_bike {
  0% {
    background-position: -300px 100%;
  }
  100% {
    background-position: 2000px 100%;
  }
}

.dark-bg {
  background-color: #12212f;
  padding: 50px 50px;
}

.dark-bg img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
}

.light-bg {
  background-color: #fff;
  padding: 50px 50px;
}

.light-bg img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
}

.extra {
  max-width: 700px;
  margin: 0 auto;
  font-size: 18px;
  color: #12202F;
  letter-spacing: 0px;
  line-height: 27px;
}
              
            
!

JS

              
                
              
            
!
999px

Console