Pen Settings



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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


                <div class="spacer">SPACER</div>

<section class="grand-carousel-band" id="pin">
    <section class="grand-carousel-body">
        PIN HERE

        <div class="container__timeline">
            <div class="timeline-nav">
                <ul class="timeline-nav__list">
                    <li class="is-active timeline-nav__list-item"></li>
                    <li class="timeline-nav__list-item"></li>
                    <li class="timeline-nav__list-item"></li>
            <div class="timeline-slides">
                <div id="first" class="slide">
                    SLIDE ONE
                <div id="second" class="slide">
                    SLIDE 2
                <div id="third" class="slide one">
                    SLIDE THREE

<div class="spacer">SPACER</div>


.grand-carousel-panel {
  overflow: hidden;

  width: 100%;
  max-width: 1250px;

.timeline-slides {
  display: flex;
  justify-content: space-between;

  width: 100vw;

.slide {
  display: flex;
  align-items: flex-end;
  flex: 1 0 auto;

  width: 100vw;
  height: 30vh;

  background-color: blue;

  background-color: yellow;

  background-color: green;

  height: 400vh;
  background-color: lightBlue;


                   const sections = gsap.utils.toArray('.slide');
    const numSections = sections.length - 1;
    const snapVal = 1 / numSections;
    let lastIndex = 0;
    const navList = document.querySelectorAll('.timeline-nav__list-item');, {
      xPercent: -100 * numSections,
      ease: 'none',
      scrollTrigger: {
        pin: '#pin',
        scrub: true,
        snap: snapVal,
        start: 'top top',
        end: 'bottom bottom',
        //if end is not given a value sliding works as expected, however I see whitespace below until last slide reaches end.
        //end: ''
        markers: true,