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

              
                <div class='wrapper'>
  <section class='vh'></section>
          <section class="pinned">
            <div class="gridd">
              <div class="imagee">
                <img src='https://www.donanimhaber.com/images/images/haber/159533/1400x1050nasa-ve-boeing-yeni-bir-ucak-tasarimi-uzerinde-calisiyor.jpg' alt="" />
              </div>
              <div class="single-step">
              
                <p class='text'>
                Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem unde expedita facilis eum hic! 
                Alias libero architecto quisquam voluptatibus assumenda nostrum, consequatur placeat temporibus minus
                blanditiis explicabo sapiente quae aspernatur. Lorem ipsum dolor sit amet consectetur adipisicing elit. Nobis enim exercitationem <br /> <br />

                sed nihil consequuntur et adipisci! Optio ea non, enim obcaecati incidunt magni esse blanditiis, explicabo rem, odit reprehenderit. Sit.
                Dicta, ipsa quia rerum accusantium quibusdam fugit placeat, voluptatibus harum quae architecto, omnis blanditiis. Voluptates aspernatur dolorum nam tempore, sit obcaecati. <br /><br /> Illum consectetur natus minus perferendis ipsum obcaecati dolorum? Magnam!
                Enim ut facilis ipsa excepturi nisi pariatur minus, dignissimos cum est nesciunt a, commodi repellendus perspiciatis asperiores esse? Voluptatem, deserunt aperiam! Inventore perferendis commodi, <br /><br />  impedit laboriosam provident ipsa expedita saepe.
                Unde ipsa, iure culpa quis nesciunt distinctio velit facilis debitis provident ipsum, neque numquam vero nisi aut earum praesentium eveniet rerum quos veritatis. Atque modi aut ipsam porro debitis distinctio?
                Praesentium nostrum iste unde quia veritatis et error maiores laudantium reprehenderit provident, voluptates itaque culpa cupiditate. Dignissimos velit dicta enim quo aut beatae reprehenderit rem, voluptates repellat perspiciatis ipsum distinctio!
                </p>
              </div>
            </div>
            <section class='vh'></section>
          </section>

      </div>
              
            
!

CSS

              
                .vh{
  display:flex;
  height:100vh;
}  

.gridd{
    display:grid;
    grid-template-columns: 50% 50%;
    height: 100%;
    max-width: 1140px;
    margin: 0 auto;
    border:2px solid;
  }
  
  .imagee{
    position:relative;
    overflow: hidden;
    width: 30vw;
    height: 20vw;
    background-color:rgba(255, 255, 23, 0.6);
   
  }
  .imagee img{
    position:absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 170%;
    object-fit: cover;
    object-position: center;
    padding: 0;
  }
  .pinned{
      border:2px solid black;
    }
  .text{
    font-size:2rem;
  }
              
            
!

JS

              
                 gsap.registerPlugin(ScrollTrigger);

    gsap.utils.toArray('.imagee').forEach((container) => {
      let image = container.querySelector('img');

      gsap.to(image, {
        y: () => image.offsetHeight - container.offsetHeight,
        ease: true,
        scrollTrigger: {
          pin: '.imagee',
          start: 'top 30%',
          end: '+=1150',
          trigger: container,
          id: 'pinned',
          markers: true,
          scrub: 1,
          invalidateOnRefresh: true,
        },
      });
    });
              
            
!
999px

Console