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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 id="wrap">
  <article class="images">
    <div class="new one">
      <div class="slide"></div>
    </div>
    <div class="new two">
      <div class="slide"></div>
    </div>
    <div class="new three">
      <div class="slide"></div>
    </div>
    <div class="new four">
      <div class="slide"></div>
    </div>
    <div class="new five">
      <div class="slide"></div>
    </div>
    <div class="new six">
      <div class="slide"></div>
    </div>
  </article>
  <article id="column">

    <div class="thumb one">
      <article class="post-wrap">
        <h1>TITLE</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida faucibus nibh, a laoreet ante. Nunc ac justo volutpat, pretium nisl ut, pulvinar diam. Curabitur faucibus vehicula feugiat. Curabitur fringilla lobortis lacus non aliquet. In sodales elementum ligula vel placerat. Ut dolor nulla, hendrerit vitae rhoncus id, pellentesque ut dolor. Aliquam metus dolor, auctor sed ultricies et, scelerisque at ante. </p>
        <button></button>
      </article>
    </div>
    <div class="thumb two">
      <article class="post-wrap">
        <h1>TITLE</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida faucibus nibh, a laoreet ante. Nunc ac justo volutpat, pretium nisl ut, pulvinar diam. Curabitur faucibus vehicula feugiat. Curabitur fringilla lobortis lacus non aliquet. In sodales elementum ligula vel placerat. Ut dolor nulla, hendrerit vitae rhoncus id, pellentesque ut dolor. Aliquam metus dolor, auctor sed ultricies et, scelerisque at ante. </p>
        <button></button>
      </article>
    </div>
    <div class="thumb three">
      <article class="post-wrap">
        <h1>TITLE</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida faucibus nibh, a laoreet ante. Nunc ac justo volutpat, pretium nisl ut, pulvinar diam. Curabitur faucibus vehicula feugiat. Curabitur fringilla lobortis lacus non aliquet. In sodales elementum ligula vel placerat. Ut dolor nulla, hendrerit vitae rhoncus id, pellentesque ut dolor. Aliquam metus dolor, auctor sed ultricies et, scelerisque at ante. </p>
        <button></button>
      </article>
    </div>
    <div class="thumb four">
      <article class="post-wrap">
        <h1>TITLE</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida faucibus nibh, a laoreet ante. Nunc ac justo volutpat, pretium nisl ut, pulvinar diam. Curabitur faucibus vehicula feugiat. Curabitur fringilla lobortis lacus non aliquet. In sodales elementum ligula vel placerat. Ut dolor nulla, hendrerit vitae rhoncus id, pellentesque ut dolor. Aliquam metus dolor, auctor sed ultricies et, scelerisque at ante. </p>
        <button></button>
      </article>
    </div>
    <div class="thumb five">
      <article class="post-wrap">
        <h1>TITLE</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida faucibus nibh, a laoreet ante. Nunc ac justo volutpat, pretium nisl ut, pulvinar diam. Curabitur faucibus vehicula feugiat. Curabitur fringilla lobortis lacus non aliquet. In sodales elementum ligula vel placerat. Ut dolor nulla, hendrerit vitae rhoncus id, pellentesque ut dolor. Aliquam metus dolor, auctor sed ultricies et, scelerisque at ante. </p>
        <button></button>
      </article>
    </div>
    <div class="thumb six">
      <article class="post-wrap">
        <h1>TITLE</h1>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis gravida faucibus nibh, a laoreet ante. Nunc ac justo volutpat, pretium nisl ut, pulvinar diam. Curabitur faucibus vehicula feugiat. Curabitur fringilla lobortis lacus non aliquet. In sodales elementum ligula vel placerat. Ut dolor nulla, hendrerit vitae rhoncus id, pellentesque ut dolor. Aliquam metus dolor, auctor sed ultricies et, scelerisque at ante. </p>
        <button></button>
      </article>
    </div>
  </article>
</section>
              
            
!

CSS

              
                *
  margin: 0
  padding: 0
  box-sizing: border-box

#wrap
  position: relative
  width: 100vw
  height: 100vh

  .images
    position: relative
    width: 30%
    height: 60vh
    top: 20%
    overflow: hidden

    .new
      position: absolute
      width: 100%
      height: 100%
      top: 0
      left: 0
      overflow: hidden

      .slide
        width: 100%
        height: 100%
        position: absolute
        left: 0
        background: url('https://placekitten.com/400/700')
        background-size: cover

      &.one
        z-index: 6

        .slide
          background: url('https://i.pinimg.com/originals/e5/a9/e8/e5a9e877bcacdc5713d2a8f98412762d.png')
          background-size: cover
          background-position: center

      &.two
        z-index: 5

        .slide
          background: url('https://en.bcdn.biz/Images/2018/6/12/27565ee3-ffc0-4a4d-af63-ce8731b65f26.jpg')
          background-size: cover
          background-position: center

      &.three
        z-index: 4

        .slide
          background: url('https://i.imgur.com/jajWPT0.jpg')
          background-size: cover
          background-position: center

      &.four
        z-index: 3

        .slide
          background: url('https://en.bcdn.biz/Images/2018/6/12/d8472a04-0d67-4dfe-ba33-faae2ef90ffd.jpg')
          background-size: cover
          background-position: center

      &.five
        z-index: 2

        .slide
          background: url('https://en.bcdn.biz/Images/2018/6/12/f0d2c2ca-dc61-4613-9685-6c98cbb8a990.jpg')
          background-size: cover
          background-position: center

      &.six
        z-index: 1

        .slide
          background: url('https://fsa.zobj.net/crop.php?r=1gYQVzNlF4Swu1WdxjisDMIZZcNcGiwWnh3GQo7Y9Gj9xP7hdPQEk2ltHd6vhXFiNm_Fy6XWnoXi-53K6nrEdwXf6BX-8lS4yP0zTWBEYvqCPa32gwwX8FlyxqPgxE9FDivwY7YGxJ5VKcCF')
          background-size: cover
          background-position: center

  #column
    position: absolute
    top: 0
    right: 0
    width: 70%
    margin-top: 20vh
    height: auto
    border-left: 1px solid

    .thumb
      display: flex
      width: 100%
      height: calc(60vh - 1px)
      background: white
      border-top: 1px solid

      &.one
        position: relative

        &::before
          content: ''
          position: absolute
          top: -20vh
          left: -1px
          width: 1px
          height: 20vh
          background: black

      &.six
        height: 60vh
        margin-bottom: 20vh
        position: relative
        border-bottom: 1px solid

        &::after
          content: ''
          position: absolute
          bottom: -20vh
          left: -1px
          width: 1px
          height: 20vh
          background: black

      .post-wrap
        width: 60%
        height: 80%
        margin: auto

        button
          width: 10vw
          height: 5vw
          background: purple
          border-radius: 5px
          border: 0
          margin-top: 5%

              
            
!

JS

              
                console.clear();
gsap.registerPlugin(ScrollTrigger);

const slider = {
  boxes: gsap.utils.toArray(".new"),
  pics: gsap.utils.toArray(".slides"),
  mainTl: gsap.timeline({
    defaults: {
      duration: 1,
      ease: "none"
    },
    scrollTrigger: {
      trigger: "#column",
      start: "top 20%",
      end: "bottom 100%",
      pin: ".images",
      scrub: true
    }
  }),
  mainTween: function (el) {},
  setNextPics: function () {
    slider.boxes.forEach((box, i) => {
      i > 0 ? gsap.set(box.firstElementChild, { scale: 2.5 }) : null;
    });
  },
  setTl: function () {
    slider.mainTl
      .to(".new.one", { yPercent: -100 })
      .to(".new.one > .slide", { yPercent: 100 }, ">-1")
      .to(".new.two > .slide", { scale: 1 }, ">-1")
      .to(".new.two", { yPercent: -100 })
      .to(".new.two > .slide", { yPercent: 100 }, ">-1")
      .to(".new.three > .slide", { scale: 1 }, ">-1")
      .to(".new.three", { yPercent: -100 })
      .to(".new.three > .slide", { yPercent: 100 }, ">-1")
      .to(".new.four > .slide", { scale: 1 }, ">-1")
      .to(".new.four", { yPercent: -100 })
      .to(".new.four > .slide", { yPercent: 100 }, ">-1")
      .to(".new.five > .slide", { scale: 1 }, ">-1")
      .to(".new.five", { yPercent: -100 })
      .to(".new.five > .slide", { yPercent: 100 }, ">-1")
      .to(".new.six > .slide", { scale: 1 }, ">-1");
  }
};

slider.setNextPics();

slider.setTl();

/*

       
*/

              
            
!
999px

Console