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

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 data-scrollbar>
  <div class="entirewrapper_no">
    <div class="b  fix-my-fixed">
      <div class="panele1">
        <h1 class="text text1">SOME SICK</h1>
      </div>
    </div>
    <section class="description panel bluenew scrollMajicFix">
      <div class="image_wrapper">
        <img src="https://images.unsplash.com/photo-1571866735550-7b1ae3bdb144?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2550&q=80" alt="">
      </div>
      <div class="quote titleholder">
        <h1 class="text">EXPERIENCE</h1>
      </div>
      <div class="scroll-down">
        <div class="arrow"></div>
      </div>
    </section>

    <section class="panel c xb scrollMajicFix">
      <h1 class="text">SOME SICK</h1>
      <div class="image_wrapper">

        <img src="https://images.unsplash.com/photo-1590428202736-ae83ef7d9c94?ixlib=rb-1.2.1&auto=format&fit=crop&w=2726&q=80" alt="">
      </div>
    </section>
    <section class="panel d scrollMajicFix">
      <h1 class="text">SMOOTH MODERN</h1>
      <div class="image_wrapper">
        <img src="https://images.unsplash.com/photo-1572302920907-288481a7835e?ixlib=rb-1.2.1&auto=format&fit=crop&w=3300&q=80" alt="">
      </div>

    </section>
    <div class="prel">

      <section class="panel e">

        <h1 class="text"> FULL-SCREEN SECTION</h1>
        <div class="image_wrapper">
          <img src="https://images.unsplash.com/photo-1561501878-aabd62634533?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3300&q=80" alt="">
        </div>
        <div class="panele">
          <div class="image_wrapper">
            <img src="https://images.unsplash.com/photo-1560257084-d568f6eb7b29?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3300&q=80" alt="">
          </div>
          <h1 class="text"> GSAP ANIMATIONS</h1>

        </div>

      </section>

      <section class="panel g scrollMajicFix">

      </section>

    </div>

    <section id="opener" class="panelz  scrollMajicFix">
      <div>

        <div class="image_wrapper">
          <img class="ani" src="https://mnrdsgn.com/img/gsap-codepen.svg" alt="">
        </div>

      </div>

    </section>
    <section id="section_2" class="endparalax  d-flex align-items-start flex-column p-5">
      <div class="image_wrapper">
        <img src="https://images.unsplash.com/photo-1537017260665-dc1b8aac0bb2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1934&q=80" alt="" class="imagefadein">
      </div>
      <div class="mt-auto detail-box p-3 bg-dark bd-highlight text-left">
        <div class="p-2 bd-highlight box">A Scary Giant Jellyfish</div>
        <div class="p-2 bd-highlight box">- Outdoor Pool</div>
        <div class="p-2 bd-highlight box2 lastboxcta bg-primary position-absolute shift-btn">+ Follow Jellyfishs'</div>
      </div>

    </section>

    <section class="newstuff f2 p-5 scrollMajicFix w-100 h-100">
      <div class="row no-gutters justify-content-center greyblock py-5">
        <div class="col-lg-6 order-lg-2  pt-5 btmimage">
          <div class="image_wrapper">
            <img src="https://images.unsplash.com/photo-1496196614460-48988a57fccf?ixlib=rb-1.2.1&auto=format&fit=crop&w=2534&q=80" alt="" class="img">
          </div>
        </div>
        <div class="col-lg-6 order-lg-1 align-self-center mb-4 p-4 p-sm-5">
          <div class="pb-sm-5 pr-sm-4 text-white btmcopy">
            <h1 class="headline-1">test multi line headline longer headline</h1>
            <p class="headline-2">Mauris ac orci enim. Nunc tempor, felis ut efficitur cursus, dolor orci luctus lectus, eget fringilla nisi lectus quis turpis. Vestibulum ornare viverra suscipit. Curabitur sollicitudin vehicula mi vel luctus. Donec quis neque vehicula, faucibus purus non, volutpat tellus. Vivamus diam augue, aliquam eget elementum id, consectetur a est. Praesent porta sem eget rutrum hendrerit. Etiam fringilla dui ut semper malesuada.</p>
          </div>
          <div class="home-btns cbtn-1">
            <a class=" mr-3 mr-4 bg-light p-3 ">VIEW WORK</a>
            <a class="cbtn-2 dark-btn bg-light p-3 ml-2">LEARN MORE</a>
          </div>
        </div>
      </div>

    </section>

  </div>
</section>
              
            
!

CSS

              
                /* tangerine font */
@import url(https://fonts.googleapis.com/css?family=Roboto+Slab);
html {
  height: auto;
  smooth-scrolling: smooth;
}
body {
  -webkit-overflow-scrolling: none;
  overflow-x: hidden;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.scrollMajicFix {
  top: 0 !important;
}
.scroll-down {
  z-index: "9999999";
}
.panel{
  height: 100vh;
  position: sticky;
  top: 0;
  // will-change: transform;
  overflow-x: hidden;
      -webkit-box-shadow:0 0 20px black; 
    -moz-box-shadow: 0 0 20px black; 
    box-shadow:0 0 20px black;
}
.panel:nth-last-child {
  height: 100vh;
  position: sticky;
  top: 0;
  // will-change: transform;
  overflow-x: hidden;

}
h1 {
  left: 50%;
  top: 50%;
  font-family: "Roboto Slab", serif;
  font-weight: 300;
  font-size: 1.8em;
  color: #4f5664;
}
.panelz {
  height: 80vh;
}
.text1 {
  margin: 0 auto;
  position: absolute;
  z-index: 999999;
  color: #fff;
  font-size: 2.8em;
  width: 100%;
  text-align: center;
}
.text {
  z-index: 999999;
}
.fix-my-fixed {
  position: fixed;
  width: 100%;
  float: right;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
}
img{background:#333333;}
.quote {
  visibility: hidden;
  margin-top: 0px;
  left: 50%;
  top: 50%;
  font-family: "Roboto Slab", serif;
  font-weight: 300;
  font-size: 50px;
  color: #fff;
  line-height: 76px;
  text-align: center;
  overflow: hidden;
}
.titleholder {
  overflow: hidden;
  overflow: hidden;
  height: 4rem;
  position: absolute;
}
.newstuff {
  height: 100vh;
  width: 100%;
  background: black;
  z-index: 11;
  position: relative;
}
.unstuck {
  width: 100%;
  height: 100vh;
  position: relative;
  top: 0;
  will-change: transform;

  display: flex;
  align-items: center;
  justify-content: center;
  h1 {
    color: #fff;
  }
}
.entirewrapper {
  width: 100%;
  height: 100vh;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
.panele {
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  will-change: transform;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  h1 {
    color: #fff;
    will-change: transform;
  }
}
.panele1 {
  width: 100%;
  display: block;
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image_wrapper img {
  position: absolute;
  -o-object-fit: cover;
  object-fit: cover;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}
#opener {
  background: #463c3c;
  width: 100%;

  display: flex;
  position: relative;
  z-index: 9;
  overflow: hidden;
  .ani {
    width: 100%;
    height: 130vh;
    position: absolute;
    z-index: 0;
    color: white;
  }
}
#section_2 {
  background: black;
  height: 100vh;
  width: 100%;
  color: #fff;
  text-align: center;
  z-index: 10;
  display: flex;
  position: relative;
  overflow:hidden;
}
.home-btns {
  position: absolute;
  right: -80px;
}
.box {
 // width: 50px;
 // height: 50px;
 // margin-right: 20px;
// background-color: #fff;
}
.bd-highlight{z-index:9;}
.shift-btn {
    top: 80%;
    right: -50%;
}
.imagefadein{height:110vh;}

              
            
!

JS

              
                  gsap.registerPlugin(ScrollToPlugin);
  gsap.registerPlugin(ScrollTrigger);
  gsap.registerPlugin( CSSPlugin );
  gsap.defaults({overwrite: 'all'});
  CSSPlugin.defaultSmoothOrigin = false;
  gsap.config({autoKillThreshold:1});
  gsap.config({autoSleep:120, force3D:"true",autoRound:true});
 ScrollTrigger.defaults({toggleActions:"resume pause none restart"});
  // scroll down arrow animation
//gsap.to(".arrow", {y: 12, ease: "power1.inOut", repeat: -1, yoyo: true});

    TweenLite.set(".quote", {xPercent:-50, yPercent:-80})


  function goToSection(i, anim) {

    gsap.set(".panel", {zIndex: (i, target, targets) => targets.length + i});
    gsap.to(window, {
      scrollTo: {y: i*innerHeight, autoKill: false
    },onUpdate: checkProgress ,
      onComplete: resetitall,
     duration: .8,
     ease: "power3.easeInOut"
    });


    if(anim) {
    //  anim.restart();
    }
    function checkProgress(){
      //  gsap.config({autoKillThreshold:2});
      gsap.set(window, {scrollTo: { autoKill: false},
        overwrite:"true"});
  }
      function resetitall() {
        //gsap.config({autoKillThreshold:1});
        gsap.set(window, {scrollTo: { autoKill: false},
        overwrite:"true"});
        }
  }

  gsap.utils.toArray(".panel").forEach((panel, i) => {

  //if (i<5){
    ScrollTrigger.create({
       anticipatePin:3,
      trigger: panel,
      pinReparent:true,
        start: "top bottom",
      onEnter: () => goToSection(i)
    });

    ScrollTrigger.create({
      anticipatePin:3,
      trigger: panel,
        pinReparent:false,
      start: "bottom bottom",
      onEnterBack: () => goToSection(i),
    });

//  }

   gsap.set(".panele" , {xPercent:100, yPercent:0});
gsap.set(".ani", { yPercent:10,xPercent:0})
gsap.set(".imagefadein", { yPercent:-10,autoAlpha:0})
gsap.set(".btmcopy", { x:-135,autoAlpha:0})
    gsap.set(".btmimage", { yPercent:10,autoAlpha:0})
        gsap.set(".cbtn-1", { xPercent:10,autoAlpha:0})
 gsap.set(".box2", { xPercent:10,autoAlpha:1})
  });
  //gsap.set(".unstickit" , {className:"unstuck"});


  gsap.to(".panele",{
    xPercent:0,rotation:.01,z:.01,duration:1,
    scrollTrigger: {
      trigger: ".e",
      start: "bottom bottom",
  // ease: "power4",
    // scrub: 2,
   endTrigger: ".g",
     // markers: true,
       end: "top top",
      //start: "bottom top",
      ease:"power3.easeIn",
     toggleActions:"restart play reverse reverse"

    }
  });

  //gsap.to(".text1", 3,{
    //xPercent:-50,alpha:1,
   // scrollTrigger: {
   //   trigger: ".xb",
    //  start: "top bottom",
  // ease: "power4",
     //scrub: 1,
     //endTrigger: ".e",
     // markers: true,
    //  end: "bottom top",
     // start: "bottom top",
    //  ease:"power2.easeOut",
   //   toggleActions:"restart reverse pause restart"play none play none

  //  }
  //});


  function move1(){};

  var splitTextTl = gsap.timeline({
    scrollTrigger: {
    trigger: ".quote",
       toggleActions: "restart reverse restart reverse",
      start: "top 65%"
    }
  }),
      splitTextQuote = new SplitText(".quote", {type:"words,chars"}),
      chars = splitTextQuote.chars; //an array of all the divs that wrap each character
  gsap.set(".quote", {visibility:"visible"});
  gsap.set (chars, {overflow: "hidden"});
  splitTextTl.from(chars, {duration: .5, yPercent:140, ease:"circ.out", stagger: 0.12}, "-=.3");



let tl = gsap.timeline();
tl.fromTo(
  ".detail-box",
  {  scaleX: 0, duration:2,transformOrigin: "left" },
  {
    scaleX: 1,duration:2,delay:1, transformOrigin: "left" 
  }
)
tl.fromTo(
  ".box",
  { autoAlpha: 0, y: +20 },
  {
    y: 0,
    autoAlpha: 1,
    duration: 2,
  }
);
tl.fromTo(
  ".box2",
  { autoAlpha: 0, x: 20 },
  {
    x: 0,
    autoAlpha: 1,
    duration: 2,
  }, "-=0"
)
ScrollTrigger.create({
  trigger: ".endparalax",
  animation: tl,
  //markers: true,
  //start: `top+=${$(".endparalax").innerHeight() / 2} center`,
  start:'center center',
  id: "tl",
  scrub: 2.5,
  //ease:Power4.easeInOut,
 // end: `bottom-=${$(".endparalax").innerHeight() / 2} center`,
    end: "bottom center+=400",
    toggleActions:"resume pause none restart"
});





  // LARGE
  function initBIG() {

    gsap.timeline({
          scrollTrigger: {
          trigger: ".e",
          id: "BIG-1",
          scrub: 3,
        //  markers: true,
          start: "top center",
          endTrigger: ".endparalax",
     // markers: true,
       end: "top -35%",
              toggleActions:"resume pause none restart"
         // pin: true
        }
      })
      .to(".ani", {yPercent:-25,ease:"power3.easeOut"},"+=.1")

  }

gsap.to('.imagefadein', {
  yPercent:0,autoAlpha:1,
  scrollTrigger: {
   // markers: true,
    trigger: '.endparalax',
    start: 'top bottom',
    scrub: 2,
      end: 'bottom 25%'
     //toggleActions:"resume pause none restart"
 //   ease:Power4.easeInOut,
// end: "bottom bottom",
  },
});



gsap.to('.btmcopy', {
  x:-30,autoAlpha:1,
  scrollTrigger: {
    //markers: true,
    trigger: '.newstuff',
    start: 'top bottom',
    scrub: 2,
      end: 'bottom bottom+=200'
     //toggleActions:"resume pause none restart"
 //   ease:Power4.easeInOut,
// end: "bottom bottom",
  },
});
  function initBIG2() {
    gsap.timeline({
          scrollTrigger: {
          trigger: ".newstuff",
          id: "Btm-Img-FadeIn",
          scrub: 3,
        //  markers: true,
          start: 'top+=200 bottom',
         // endTrigger: ".newstuff",
     // markers: true,
     end: 'bottom bottom',
              toggleActions:"resume pause none restart"
         // pin: true
        }
      })
      .to(".btmimage", {duration:1.7,yPercent:0,autoAlpha:1,ease:"power3.easeOut"},"+=1.4")
.to(".cbtn-1", {duration:1,xPercent:0,autoAlpha:1,ease:"power3.easeOut"},"+=.2")
  }
  
  
  initBIG();
  initBIG2();
              
            
!
999px

Console