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

Auto Save

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="services" id="services">
  <div class="services-container">
    <div class="services-content-levo">
      <div class="kartica kartica1">
        <h3>Web development</h3>
        <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Natus doloribus qui doloremque modi, dolor ab nulla architecto vero ratione aspernatur rem, cumque ipsam odit commodi! Ab animi corrupti consequatur. Nulla!
          Ipsa aliquam fuga accusamus repellat nobis natus qui corrupti! Beatae, temporibus officiis, recusandae esse illum quos corporis, quas fuga autem sed amet quibusdam explicabo! Sunt aperiam sed repellat rem modi!</p>
      </div>
      <div class="kartica kartica2">
        <h3>Web development</h3>
        <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Natus doloribus qui doloremque modi, dolor ab nulla architecto vero ratione aspernatur rem, cumque ipsam odit commodi! Ab animi corrupti consequatur. Nulla!
          Ipsa aliquam fuga accusamus repellat nobis natus qui corrupti! Beatae, temporibus officiis, recusandae esse illum quos corporis, quas fuga autem sed amet quibusdam explicabo! Sunt aperiam sed repellat rem modi!</p>
      </div>
      <div class="kartica kartica3">
        <h3>Web development</h3>
        <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Natus doloribus qui doloremque modi, dolor ab nulla architecto vero ratione aspernatur rem, cumque ipsam odit commodi! Ab animi corrupti consequatur. Nulla!
          Ipsa aliquam fuga accusamus repellat nobis natus qui corrupti! Beatae, temporibus officiis, recusandae esse illum quos corporis, quas fuga autem sed amet quibusdam explicabo! Sunt aperiam sed repellat rem modi!</p>
      </div>

    </div>
    <div class="services-content-desno">
      <div class="large">
        <h2 class="services-h2">Usluge</h2>
      </div>
    </div>
  </div>
</section>
              
            
!

CSS

              
                .services{
    position: relative;
    height: auto;
}
.services-container{
    padding: 24px;
}
.services-content-levo{
    width: 50%;
}
.services-content-levo{
    
}
.kartica{
    margin-top: 100svh;
}
.kartica>h3{
    font-size: 63px;
    padding: 0 0 36px 0;
}
.kartica>p{
    font-size: 16px;
}
.services-content-desno{
    width: 50%;
/*     overflow-x: hidden; */
    text-transform: uppercase;
    position: absolute;
    top: 0;
    right: -100px;
}

.services-content-desno > .large {
  width: 100%;
  overflow: hidden;
}

.services-content-desno > .large > h2 {
    font-size: 700px;
    letter-spacing: 200px;
}
              
            
!

JS

              
                var servicesH = document.getElementById("services").clientHeight;

const h2 = document.querySelector("h2.services-h2");

let tl1 = gsap.timeline({
  scrollTrigger: {
    trigger: ".services-content-desno",
    start: "center center",
    end: "+=3150px",
    markers: true,
    toggleActions: "restart none none none",
    scrub: 1,
    pin: ".services-content-desno"
  }
});
tl1
.from(".large", {
  xPercent: -100,
  ease: "none",
})
.to(h2, {
  x: () => -(h2.scrollWidth - (window.innerWidth / 2)),
  ease: "none",
}, "<");

              
            
!
999px

Console