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

              
                <div style="height:100vh" class="w-100 content"></div>
<div style="height:50px;font:26px bold" class="top-0 left-0 fixed px4 mx2 center pt2">header</div>
<section id="services-section" class="section-el headerteaser teaserstart flex-column center slide mainpage pb4 z3 lt-bg overflow-hidden ">
  <div id="services-section-content" class="">
    <!-- services title -->
    <div id="main-title" class="w-100 sections-heading center pt3"><span class="   h1 caps">main title</span></div>
    
    <div id="content1-wrapper">
      <!-- content1 article -->
      <article id="content1-article" class="md-col-12 md-col md-flex mt4  ">
        <div id="content1-wrapper-list" class="md-col-5 md-col services-list mb3 left-align items-start">
          <ul class="h2 m0 line-height-3 list-style-none ">
            <li><div class="line-height-1 bold pb2 overflow-hidden from-left-off fade-out">Title</div></li>
            <li class=" fade-out"><div>item 1</div></li>
            <li class=" fade-out"><div>item 2</div></li>
            <li class=" fade-out"><div>item 3</div></li>
            <li class=" fade-out"><div>item 4</div></li>
            <li class=" fade-out"><div>item 5</div></li>
          </ul>
        </div>
        <div id="content1-wrapper-images" class="md-col-7 md-col  h-100">
          <div  style="height:1000px; content:''; width:100%; background:red"></div>       
        </div> 
        </article>
      <article class="col-12 md-flex  ">
        <div id="content2-list" class="md-col-5 md-col services-list pr2 mb3 left-align items-start">
<ul class="h2 m0 line-height-3  sentence list-style-none ">
            <li><div class="line-height-1 bold pb2 overflow-hidden from-left-off fade-out">Title</div></li>
            <li class=" fade-out"><div>item 1</div></li>
            <li class=" fade-out"><div>item 2</div></li>
            <li class=" fade-out"><div>item 3</div></li>
            <li class=" fade-out"><div>item 4</div></li>
            <li class=" fade-out"><div>item 5</div></li>
          </ul>
        </div>
        <div id="content2-wrapper-images" class="md-col-7 md-col  h-100 ">
       <div  style="height:1000px; content:''; width:100%; background:green"></div>
        </div>
      </article>
      <!-- project management article -->
      <article class="col-12 md-flex  ">
        <div id="content3-list" class="md-col-5 md-col services-list pr2 mb3 left-align items-start">
          <ul class="h2 m0 line-height-3  sentence list-style-none">
            <li><div class="line-height-1 bold pb2 overflow-hidden from-left-off fade-out">Title</div></li>
            <li class=" fade-out"><div>item 1</div></li>
            <li class=" fade-out"><div>item 2</div></li>
            <li class=" fade-out"><div>item 3</div></li>
            <li class=" fade-out"><div>item 4</div></li>
            <li class=" fade-out"><div>item 5</div></li>
          </ul>
        </div>
        <div id="content3-wrapper-images" class=" md-col-7 md-col  h-100 z">
       <div  style="height:1000px; content:''; width:100%; background:tomato"></div>
        </div>
      </article>
      <!-- content4 article -->
      <article class="col-12 md-flex  ">
        <div id="content4-list" class="services-list md-col-5 md-col pr2 mb3 left-align items-start">
          <ul class="h2 m0 line-height-3  sentence list-style-none">
            <li><div class="line-height-1 bold pb2 overflow-hidden from-left-off fade-out">Title</div></li>
            <li class=" fade-out"><div>item 1</div></li>
            <li class=" fade-out"><div>item 2</div></li>
            <li class=" fade-out"><div>item 3</div></li>
            <li class=" fade-out"><div>item 4</div></li>
            <li class=" fade-out"><div>item 5</div></li>
          </ul>
        </div>
        <div id="content4-wrapper-images" class=" md-col-7 md-col  h-100 ">
        <div  style="height:1000px; content:''; width:100%; background:gray"></div>
        </div>
      </article>
    </div>
  </div>
</section>
              
            
!

CSS

              
                
              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);

// section animation
let sectionvh = gsap.utils.toArray("section");
ScrollTrigger.matchMedia({
  // desktop
  "(min-width: 832px)": function init() {

var scene2 = gsap.timeline(); 

scene2.from("#maintitle", {duration: 100, autoAlpha:0},0)
.from("#services-section.lt-bg", {duration: 30, backgroundColor:"#111"}, 10)
.from("#content1-wrapper-images", {duration: 200, autoAlpha: 0}, 100)
.from("#content1-wrapper-list", {duration: 1, autoAlpha: 0})
.from("#content1-wrapper-images", {duration: 100, x:"-30%", ease:"power1.inOut"}, "+=50")
.from("#content1-wrapper-list", {duration: 100, x:"70%", ease:"power1.inOut"}, '<')

ScrollTrigger.create ({
  trigger: "#services-section",
  animation: scene2,
  start: "top 60%",
  endTrigger:"#services-section",
  end:  "top 30",
  scrub: .5
    }); 
      },
  "(max-width: 831px)": function() {
  },
  "all": function() {
  }
});

// section info pin
ScrollTrigger.create ({
  trigger: "#content1-wrapper",
  start: "top top",
  end:  "top 50%",
  endTrigger: "#content2-list",
  scrub: true,
  pin:"#content1-wrapper-list",
  pinSpacing:false,  
  markers: true
});

// general fade-out top of viewport
gsap.utils.toArray('.fade-out').forEach(fadeOut => {
  gsap.fromTo(fadeOut, {
      autoAlpha: 1, 
    }, {
    scrollTrigger: {
      trigger: fadeOut,
      start:"top 100px",
      end:"top 50px",
      scrub:true,
    },
 autoAlpha: 0, 
  });
}); 

// general fade up into ViewPort
gsap.utils.toArray('.fade-up').forEach(fadeUp => {
  gsap.fromTo(fadeUp, {
      autoAlpha: 0, 
      y: 70,
    }, {
    scrollTrigger: {
      trigger: fadeUp,
      start:"top 95%",
      end:"top 90%",
  scrub:.7,
     },
      autoAlpha: 1, 
      y: 0
  });
}); 
              
            
!
999px

Console