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="fill"></section>

<section class="pin-left-scroll-right">
            <div class="pin__container"
                style="background-image: url(https://hefringengineering.com/wp-content/uploads/2023/05/pin_background.jpg);">
                <div class="pin__container-wrapper">
                    <div class="pin__bottom">
                        <div class="pin__left">
                            <div class="pin__img-container mobile">
                                <img src="https://hefringengineering.com/wp-content/uploads/2023/05/Oceanscout_Top1.png"
                                    alt="glider-spinning" />
                            </div>
                            <div class="pin__img-container">
                                <img src="https://hefringengineering.com/wp-content/uploads/2023/05/Ocean-Scout-Angle.png"
                                    alt="glider-spinning" />
                            </div>
                            <div class="pin__img-container mobile">
                                <img src="https://hefringengineering.com/wp-content/uploads/2023/05/Oceanscout_Cut.png"
                                    alt="glider-spinning" />
                            </div>
                        </div>
                        <div class="pin__right">
                            <div class="pin__paragraph">
                                <h4 class="pin__title">
                                    Improving Storm Forecasts
                                </h4>
                                <p class="pin__body">
                                    Operational use of gliders to measure ocean
                                    temperature and salinity for input into
                                    forecast models can improve prediction of
                                    storm intensity and track. Gliders can be
                                    deployed during storms to collect this
                                    information and send it back in real time.
                                </p>
                            </div>
                            <div class="pin__paragraph">
                                <h4 class="pin__title">
                                    Marine Mammal Observations
                                </h4>
                                <p class="pin__body">
                                    Gliders are an excellent platform for
                                    passive acoustic sensors that listen for
                                    marine mammals and record the ocean
                                    soundscape. The platform is quiet and
                                    supports high endurance missions covering
                                    large domains.
                                </p>
                            </div>
                            <div class="pin__paragraph">
                                <h4 class="pin__title">
                                    Battlespace Awareness
                                </h4>
                                <p class="pin__body">
                                    Gliders can be rapidly deployed in a region
                                    of interest to collect subsurface
                                    information, such as sound speed profiles,
                                    acoustic signatures, critical to naval
                                    operations. This information is then sent in
                                    real time by satellite or other means
                                    providing immediate domain awareness to
                                    decision makers.
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
              
            
!

CSS

              
                .fill {
  height: 1000px;
  border: 1px solid red;
}    
body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
.pin,
    .dissect {
        &__container {
            height: 100vh;
            background-color: rgb(0, 2, 16);
            margin: auto;
            padding-top: 50px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: 100%;
        }

        &__container-wrapper {
            max-width: 1500px;
            margin: auto;
        }

        &__header-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        &__subheader {
            color: #3ec74c;
            font-family: 'Nitti';
            font-weight: 400;
            font-style: normal;
            font-size: 28px;
        }

        &__header {
            font-size: 53px;
            max-width: 663px;
            text-align: center;
            color: rgba(138, 139, 145, 1);

            .white {
                color: white;
            }
        }

        &__bottom {
            display: flex;
            margin: auto;
            width: 80%;
            margin-top: 15%;
            max-width: 1500px;
            gap: 50px;
        }

        &__img-container {
            width: 100%;
            height: 300px;
            position: absolute;
            top: -100px;
            opacity: 0;
        }

        &__left {
            width: 50%;
            display: flex;

            img {
                right: 0;
                bottom: 0;
                width: 100%;
                height: 100%;
                position: absolute;
                object-fit: contain;
            }
        }

        &__right {
            width: 50%;
        }

        &__paragraph {
            opacity: 1;
            position: absolute;
        }

        &__title {
            color: #3ec74c;
            font-family: 'Nitti';
            font-weight: 500;
            font-style: normal;
            font-size: 24px;
            margin-bottom: 10px;
        }

        &__body {
            line-height: 32.13px;
            font-size: 18px;
        }
    }
              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);

const paragraphs = gsap.utils.toArray('.pin__paragraph')
const gliders = gsap.utils.toArray('.pin__img-container')

const pinTimeline = gsap.timeline({
  scrollTrigger: {
    trigger: '.pin-left-scroll-right',
    start: 'top top',
    end: '+=300%',
    scrub: 1,
    pin: '.pin-left-scroll-right',
    snap: {
      snapTo: 'labels',
      duration: { min: 0.2, max: 0.4 },
      ease: 'power1.inOut',
    },
  },
});

paragraphs.forEach((paragraph, i) => {
  pinTimeline.fromTo(paragraph,
    { opacity: 0, y: '20vh', ease: 'power4' },
    { opacity: 1, y: '0vh', ease: 'power4' },
    i ? '+=60%' : 0
  )
  .to(gliders[i], {opacity: 1}, "<")
    .addLabel(`snap-point${i}`);
  if (i < paragraphs.length - 1) {
    pinTimeline.fromTo(paragraph,
      { opacity: 1, y: '0' },
      { opacity: 0, y: '-20vh' }
    )
    .to(gliders[i], { opacity: 0 }, "<");
  }
})

// gliders.forEach((glider, i) => {
//   gliderTimeline
//     .to(glider, { opacity: '1' }, i ? '+=60%' : 0)
//     .addLabel(`snap-point${i}`)
//     .to(
//     i !== paragraphs.length - 1 ? glider : null,
//     { opacity: '0' },
//     '+=60%'
//   )
// })

              
            
!
999px

Console