Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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="container">
  <div id="page-wrap">
    <div class="row">
      <div class="encart-desc rellax">
        <h1>Titre 1</h1>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias nihil tenetur tempore, unde perferendis quod, cum modi placeat et repellendus debitis eum vel doloribus similique commodi! Ducimus odio voluptates obcaecati.</p>
      </div>
      <img  class="img-margin rellax" data-rellax-speed="-3" src="https://picsum.photos/410/300">
    </div>
    <div class="row">
      <div class=""><img class="img-margin" src="https://picsum.photos/600/600"></div>
      <div class=""><img class="img-margin rellax"  src="https://picsum.photos/400/400" data-rellax-speed="2"></div>
    </div>
    <div class="row">
      <div class="encart-desc">
        <h1>Titre 2</h1>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias nihil tenetur tempore, unde perferendis quod, cum modi placeat et repellendus debitis eum vel doloribus similique commodi! Ducimus odio voluptates obcaecati.</p>
      </div>
      <img class="img-margin rellax" data-rellax-speed="2" src="https://picsum.photos/400/300">
    </div>
    <div class="row">
      <img class="img-margin" src="https://picsum.photos/600/600">
      <img class="img-margin rellax"  src="https://picsum.photos/400/400" data-rellax-speed="-2">
    </div>
  </div>
</div>
              
            
!

CSS

              
                body, html {
  margin: 0;
  padding: 0;
  font-family: "Raleway", sans;
  background-color: #fdd880;
}
.container {
  width: 100%;
  min-height: 100vh;
}
#page-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 1vw;
}
.row {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
/* .row > * {
    flex: 0 0 auto;
    width: 25%;
} */
.img-margin {
  margin: 1.2vw;
  max-width: 100%;
  height: auto;
}

@media (max-width:768px) {
  .row {
    flex-direction: column;
  }
  .img-margin {
    margin: 0.5vw;
  }
}
.encart-desc h1 {
  font-size: 3rem;
}
.encart-desc p {
  font-size: 1.3rem;
  max-width: 35vw;
}
              
            
!

JS

              
                // var scene = document.getElementById('hover-parallax');
// var parallaxInstance = new Parallax(scene);
// parallaxInstance.friction(0.8, 0.8);

// Parallax on scroll. From -10 to +10.
var rellax = new Rellax('.rellax');



              
            
!
999px

Console