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

              
                <section class="introsection">
  <div class="img1">
    <h3 class="letterpress2">Voyage</h3>
</div>
<div class="container">
    <div class="inner">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Delectus harum ipsam excepturi, quisquam aperiam unde dolore, alias doloribus quibusdam consectetur fugit ullam modi corrupti quaerat, odit ipsum ab nostrum ratione voluptate quasi. Illum pariatur reiciendis eaque explicabo officiis nulla a fugit libero recusandae amet provident vitae alias veniam, nesciunt tempora!</p>
  </div>
  <div class="mod-inline os-animation" data-os-animation="fadeInRight" data-os-animation-delay="0s">
      <h3>Heading here</h3>
      <p>Voluptatem at porro similique enim veritatis tempora voluptate amet sed assumenda necessitatibus. Qui voluptate nostrum dignissimos, nisi ad quo necessitatibus. Aliquid, aut. Suscipit animi iusto, quia quibusdam pariatur saepe fugiat, debitis et maiores molestiae, illo aperiam nam inventore! Mollitia corrupti, ea iste quod veniam dolor aliquid delectus commodi aut qui?</p>
  </div>
  <div class="inner">
      <p>Earum eligendi temporibus, pariatur iste necessitatibus ad, nemo neque quasi quia error, minima nam molestias eum! At assumenda iste autem ea aut hic blanditiis quo possimus! Exercitationem atque officia expedita at, ut illo, ad tenetur, totam eius corporis possimus voluptates ea molestias esse earum obcaecati provident itaque fugit in reiciendis?</p>
      <p class="mod-inset-left">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, reprehenderit.</p>
      <p>Ad aliquid quae voluptatibus, doloribus? Repudiandae quibusdam suscipit esse vero! Blanditiis, dignissimos expedita esse excepturi id quasi atque fuga reprehenderit nesciunt iusto officia culpa consectetur ipsum doloribus voluptatibus aliquam aut non minima, voluptas? Eligendi similique, voluptas qui aliquam non assumenda saepe unde! Fugiat ipsum aliquid perspiciatis perferendis, ex veritatis provident.</p>
      <p>Assumenda aut saepe dolorem architecto autem in cumque ratione inventore tenetur illum optio ullam doloribus odio, pariatur nemo commodi, sapiente suscipit, itaque ut! Doloribus, esse iure officiis magni ab, dolore perspiciatis quam illum suscipit voluptates veritatis inventore rerum molestiae pariatur ad, error iste. Voluptas in maxime velit ut voluptates facilis!</p>
  </div>  </div>
</section>
<section>
    <div class="img2 os-animation" data-os-animation="fadeIn" data-os-animation-delay="0s">
      <h3>Dusk</h3>
  </div>
  <div class="container">
      <div class="caption os-animation" data-os-animation="fadeInRight" data-os-animation-delay="0s">
        <h3>Caption</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate quibusdam excepturi unde ipsam earum commodi nostrum eveniet architecto, vitae a.</p>
    </div>
    <div class="inner">
        <p  class="os-animation" data-os-animation="fadeInUp" data-os-animation-delay="0s">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dicta saepe quas et quam, nemo eligendi hic perspiciatis ducimus quae inventore in expedita nobis odit possimus dignissimos deleniti cum quia voluptas! Non, laboriosam molestias optio cum asperiores dicta, doloremque ex! Consequuntur laboriosam nesciunt laudantium eaque repellendus sed placeat, rem labore eligendi.</p>
        <p  class="os-animation" data-os-animation="fadeInUp" data-os-animation-delay=".1s">Iusto in omnis inventore alias error eveniet deleniti assumenda officia expedita impedit, iste doloribus blanditiis? Enim ad esse aspernatur, repellat autem accusantium. Assumenda nam optio saepe esse culpa, ut ex doloribus quisquam perspiciatis laudantium voluptatibus incidunt placeat sequi deleniti distinctio dignissimos dolores nihil excepturi maxime, minima id tempora? Praesentium, similique.</p>
        <p  class="os-animation" data-os-animation="fadeInUp" data-os-animation-delay=".2s">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero unde dolores quis ipsa, magni quas nam fuga similique labore accusantium mollitia quo accusamus atque. Totam officiis tenetur numquam magni, a alias voluptatibus delectus modi maiores ad, nulla dolor sunt atque, dicta inventore beatae quae iusto dolores laudantium consequatur maxime incidunt.</p>
        <p  class="os-animation" data-os-animation="fadeInUp" data-os-animation-delay=".3s">Optio fugiat dolor commodi ut tenetur cum, facilis labore, sint, quis unde cumque libero saepe. Sequi ut aliquam, itaque numquam sit ea animi quos cupiditate temporibus? Eius molestias eveniet pariatur laboriosam numquam, expedita laborum hic iure optio, enim sed tempore quas nemo possimus, aliquam sit quibusdam explicabo voluptate aspernatur reprehenderit.</p>
    </div>
</div>
</section>

<section class="staggered-animation-container">
    <h1>This section contains staggered animations!</h1>
    <p class="staggered-animation" data-os-animation="fadeInRight" data-os-animation-delay="0.5s">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.</p>
    <p class="staggered-animation" data-os-animation="fadeInRight" data-os-animation-delay="0.8s">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.</p>
    <p class="staggered-animation" data-os-animation="fadeInRight" data-os-animation-delay="1.1s">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.</p>
</section>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  color: #646464;
  background: #f0f0f0;
  font-size: 100%;
  line-height: 1.4;
}
.introsection {
  /* background-color: #444; */
}
.letterpress{
font-family: Helvetica, sans-serif;
margin: 0 auto;
  height: 100vh;
 display: flex;
  align-items: center;
  justify-content: center;
text-shadow:   1px 2px 0px #808080 , 
               -1px -2px 1px #333;
color: #222;
font-size: 4vw;
  text-align: left;
  font-weight: 300;
  letter-spacing: -.05em;
  max-width: 60vw;
}
.container,
.staggered-animation-container
{
  position: relative;
  margin-left: auto;
  max-width: 75%;
  margin-right: auto;
  font-size: .875em; //14px
  padding-bottom: 40px;
  @media only screen and (min-width:768px) {
    max-width: 700px;  
  }
  @media only screen and (min-width:1000px) {
    max-width: 920px;  
  }
  .inner {
    max-width: 66%;
  }
}
.mod-inset-left {
  background: #cfcfcf;
  padding: 1.15em;
  margin: 1em 0;
  @media only screen and (min-width:768px) {
  width: 20%;
  float: left;
  margin: 0 1em 0 0 ;
    
  }
}
.mod-inline, 
.caption {
  float: right;
  clear: both;
  position: relative;
  overflow: hidden;
  width: 30%;
  &.left {
    padding-right: 50px;
    float: left;
  }
  h3 {
    font-weight: 700;
    color: #000;
    line-height: 1.2;
    font-size: 1em;
    padding-top: 1em;
    border-top: 2px solid;
    margin: 0 ;
  }
  p, li {
    font-size: .75rem;
    line-height: 1.6;
  }
}

[class^="img"] {
  background-attachment: fixed;
  height: 200px;
  margin-bottom: 50px;
  padding: 40px;
  display: table;
  width: 100%;
  h3 {
    display:table-cell;
    vertical-align: middle;
    font-size: 60px;
    text-align: center;
    color: #fff;
  }
  + .container .caption {
    background: #fff;
    padding: 20px;
    margin-top: -50px;
    h3 {
      border-top: none;
      padding-top: 0;
    }
  }
}

.img1 {
  background: url(https://unsplash.imgix.net/9/DeepInTheForest_cre8art4life_JulieGeiger.jpg) no-repeat center bottom / cover;
  height: 100vh;

}
.img2 {
  height: 300px;
  background: url(https://unsplash.imgix.net/photo-1422513391413-ddd4f2ce3340?dpr=2&fit=crop&fm=jpg&q=75&w=1050) no-repeat center center / cover;
    background-attachment: fixed;

}



*, *:before, *:after {
  box-sizing: border-box;
}
html, body {
  /*   height: 100%; */
  overflow: hidden;
  overflow-y: auto;
}


// animation

.os-animation{
  opacity: 0;
}
 
.os-animation.animated{
    opacity: 1;
}
              
            
!

JS

              
                function onScrollInit( items, trigger ) {
  items.each( function() {
    var osElement = $(this),
        osAnimationClass = osElement.attr('data-os-animation'),
        osAnimationDelay = osElement.attr('data-os-animation-delay');
      
        osElement.css({
          '-webkit-animation-delay':  osAnimationDelay,
          '-moz-animation-delay':     osAnimationDelay,
          'animation-delay':          osAnimationDelay
        });

        var osTrigger = ( trigger ) ? trigger : osElement;
        
        osTrigger.waypoint(function() {
          osElement.addClass('animated').toggleClass(osAnimationClass);
          },{
              triggerOnce: false,
              offset: '90%'
        });
  });
}

 onScrollInit( $('.os-animation') );
 onScrollInit( $('.staggered-animation'), $('.staggered-animation-container') );
              
            
!
999px

Console