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="stage">
  <div class="container">
    <ul class="ring">
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 1</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 2</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 3</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 4</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 5</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 6</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 7</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 8</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 9</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 10</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 11</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 12</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 13</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 14</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 15</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 16</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 17</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 18</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 19</a></li>
      <li class="item"><a href="https://makeaspectacle.co.uk">this is some text item 20</a></li>
    </ul>
  </div>
</div>

              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: sans-serif;
  font-weight: bolder;
}

.stage, .ring, .item {
  width:100%;
  height: 100%;
  transform-style: preserve-3d;
  user-select:none;
}

.stage {
  overflow:hidden;
}


div, svg, ul, li {
  position: absolute;
}
ul {
  list-style: none;
  padding: 0;
}
.container {
  perspective: 2000px;
  width: 800px;
  height: 70px;  
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
}
.item {
  display: flex;
  justify-content: center;
  vertical-align: center;
  margin: auto;

}
a {
font-size: 2.5em;
  margin: auto;
}
.stage:after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 10%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,1) 90%, rgba(255,255,255,1) 100%);
  content: " ";
  pointer-events: none;
}
li {
  border: 1px solid;
}
              
            
!

JS

              
                console.clear();

gsap.registerPlugin(ScrollTrigger);

// heavily inspired by this pen by Tom Miller: https://codepen.io/creativeocean/pen/mdROBXx
// https://codepen.io/creativeocean

let xPos = 0;

gsap
  .timeline()
  .set(".ring", { rotationX: -90 })
  //set initial rotationY so the parallax jump happens off screen
  .set(".item", {
    // apply transform rotations to each image
    rotateX: (i) => (i * -18),
    transformOrigin: "50% 50% -250px",
    z: 250,
    backfaceVisibility: "hidden"
  })
  .set(".ring", { rotationX: 60 });

gsap.to(".ring", {
  rotationX: "+=1440",
  ease: "none",
  scrollTrigger: {
    trigger: ".stage",
    pin: true,
    scrub: 0.75,
    start: "top top",
    end: "+=2000",
  }
});

              
            
!
999px

Console