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="vh">100VH</section>

<section class="view">
  <div class="wrapper container-fluid ">

    <!--    slide1    -->
    <div class="slide pull-right col-lg-8 col-lg-offset-2">
      <span class="first white SundayMediumItalic">Title1</span>
      <span class="second orange SundayExtraBoldItalic">Subtitle1</span>
      <img class="img col-lg-12" src="https://loremflickr.com/1316/594"/>
      <div class="credits col-lg-12">
        <span class="text white SundayRegular">Text</span>
        <div class="text-name">
          <span class="orange SundayRegular">FullName1</span>
        </div>
        <span class="animation white SundayRegular">Animation</span>
        <div class="animation-name">
          <span class="orange SundayRegular">FullName2</span>
        </div>
      </div>
    </div>
    <!--    slide2    -->
    <div class="slide pull-right col-lg-8 col-lg-offset-2">
      <span class="first white SundayMediumItalic">Title2</span>
      <span class="second orange SundayExtraBoldItalic">Subtitle2</span>
      <img class="img col-lg-12" src="https://loremflickr.com/1316/594"/>
      <div class="credits col-lg-12">
        <span class="text white SundayRegular">Text</span>
        <div class="text-name">
          <span class="orange SundayRegular">FullName1</span>
        </div>
        <span class="animation white SundayRegular">Animation</span>
        <div class="animation-name">
          <span class="orange SundayRegular">FullName2</span>
        </div>
      </div>
    </div>
    <!--    slide3    -->
    <div class="slide pull-right col-lg-8 col-lg-offset-2">
      <span class="first white SundayMediumItalic">Title3</span>
      <span class="second orange SundayExtraBoldItalic">Subtitle3</span>
      <img class="img col-lg-12" src="https://loremflickr.com/1316/594"/>
      <div class="credits col-lg-12">
        <span class="text white SundayRegular">Text</span>
        <div class="text-name">
          <span class="orange SundayRegular">FullName1</span>
        </div>
        <span class="animation white SundayRegular">Animation</span>
        <div class="animation-name">
          <span class="orange SundayRegular">FullName2</span>
        </div>
      </div>
    </div>
    <!--    slide4    -->
    <div class="slide pull-right col-lg-8 col-lg-offset-2">
      <span class="first white SundayMediumItalic">Title4</span>
      <span class="second orange SundayExtraBoldItalic">Subtitle4</span>
      <img class="img col-lg-12" src="https://loremflickr.com/1316/594"/>
      <div class="credits col-lg-12">
        <span class="text white SundayRegular">Text</span>
        <div class="text-name">
          <span class="orange SundayRegular">FullName1</span>
        </div>
        <span class="animation white SundayRegular">Animation</span>
        <div class="animation-name">
          <span class="orange SundayRegular">FullName2</span>
        </div>
      </div>
    </div>
    <!--    slide5    -->
    <div class="slide pull-right col-lg-8 col-lg-offset-2">
      <span class="first white SundayMediumItalic">Title5</span>
      <span class="second orange SundayExtraBoldItalic">Subtitle5</span>
      <img class="img col-lg-12" src="https://loremflickr.com/1316/594"/>
      <div class="credits col-lg-12">
        <span class="text white SundayRegular">Text</span>
        <div class="text-name">
          <span class="orange SundayRegular">FullName1</span>
        </div>
        <span class="animation white SundayRegular">Animation</span>
        <div class="animation-name">
          <span class="orange SundayRegular">FullName2</span>
        </div>
      </div>
    </div>

  </div>
</section>

<section class="vh">100VH</section>

              
            
!

CSS

              
                /* *** grid *** */
.pull-right {
  float: right !important;
}

.col, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
  position: relative;
  min-height: 1px;
}

.col, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    float: left;
}

.col-lg-8 {
  width: 66.66666667%;
}

.col-lg-12 {
    width: 100%;
}

.col-lg-offset-2 {
    margin-left: 16.66666667%;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #151328;
}

.vh {
  height: 100vh;
  font-family: 'SundayBold', Arial, sans-serif;
  background-color: #151328;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10vw;
  font-weight: bold;
}

.view {
  position: relative;
}

.logo {
  padding-top: 38px;
  padding-left: 40px;
}

.wrapper {
  height: 100vh;
  width: 100%;
}

.slide {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 95px;
  outline: 1px solid red
}

.slide .second {
  margin-bottom: 30px;
}

.credits .text {
  font-size: 15px;
  line-height: 23px;
}
.credits .animation {
  margin-top: 15px;
  font-size: 15px;
  line-height: 23px;
}

.credits .text-name {
  margin-bottom: 15px;
}

.img {
  max-height: 500px;
}
.text, .animation {
  display: block;
}

.white {
  color: #ffffff
}

.orange {
  color: #f99901
}
              
            
!

JS

              
                const slides = gsap.utils.toArray('.slide')
const height = 100 * (slides.length - 1)


var tl = gsap.timeline({
  duration: slides.length,
  scrollTrigger: {
    trigger: '.view',
    pin: '.view',
    start: 'top top',
    end: '+=' + height + '%',
    scrub: 1
  }
})

slides.forEach(function (elem, i) {
  // for each slide:
  gsap.set(elem, { position: 'absolute', top: 0 })
  tl.from(elem.querySelector('.first'), { autoAlpha: 0, duration: 1, ease: 'back' }, i)
  tl.from(elem.querySelector('.first'), { translateY: 30, duration: 1, ease: 'power' }, i)
  tl.from(elem.querySelector('.second'), { autoAlpha: 0, duration: 1, ease: 'back' }, i)
  tl.from(elem.querySelector('.second'), { translateY: 30, duration: 1, ease: 'power' }, i)

  tl.from(elem.querySelector('.text'), { autoAlpha: 0, duration: 1, ease: 'back' }, i)
  tl.from(elem.querySelector('.text'), { translateY: 20, duration: 1, ease: 'power' }, i)
  tl.from(elem.querySelector('.text-name'), { autoAlpha: 0, duration: 1, ease: 'back' }, i)
  tl.from(elem.querySelector('.text-name'), { translateY: 20, duration: 1, ease: 'power' }, i)
  tl.from(elem.querySelector('.animation'), { autoAlpha: 0, duration: 1, ease: 'back' }, i)
  tl.from(elem.querySelector('.animation'), { translateY: 20, duration: 1, ease: 'power' }, i)
  tl.from(elem.querySelector('.animation-name'), { autoAlpha: 0, duration: 1, ease: 'back' }, i)
  tl.from(elem.querySelector('.animation-name'), { translateY: 20, duration: 1, ease: 'power' }, i)

  // don't animate on the last slide
  if (i !== slides.length - 1) {
    tl.to('.first', { autoAlpha: 0 }, i + 0.75)
    tl.to('.second', { autoAlpha: 0 }, i + 0.75)
    tl.to('.text', { autoAlpha: 0 }, i + 0.75)
    tl.to('.text-name', { autoAlpha: 0 }, i + 0.75)
    tl.to('.animation', { autoAlpha: 0 }, i + 0.75)
    tl.to('.animation-name', { autoAlpha: 0 }, i + 0.75)
  }
})

const images = gsap.utils.toArray('.img');
images.forEach(img => {
  gsap.to(img, {
    ScrollTrigger: {
      trigger: img,
      start: 'top top',
      pin: true,
      pinSpacing: false,
      markers: true
    }
  })
})

              
            
!
999px

Console