Pen Settings



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


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.


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.


<link rel="stylesheet" type="text/css" href="">

<div class="wrapper" data-scroll-container>
  <section class="container" data-scroll-section data-scroll-section-id="section0"></section>
  <section class="container" data-scroll-section data-scroll-section-id="section1">
    <h1 >Hey</h1>
    <p >👋</p>
  <section class="container test" >
    <h1 data-scroll data-scroll-speed="1">What's up?</h1>
    <p data-scroll data-scroll-speed="2">😬</p>

<script src=''></script>
<script src=''></script>
<script src=''></script>


.wrapper {
  width: 1000px;
  margin: 0 auto;

.container {
  width: 100%;
  height: 800px;
  background-color: blue;

.container:nth-child(2) {
  background-color: palegoldenrod;

.container:last-child {
  background-color: violet;

h1 {
  color: darkblue;
  font-weight: 700;
  font-size: 400%;

p {
  color: tomato;
  font-size: 300%;



                const locoScroll = new LocomotiveScroll({
  el: document.querySelector('[data-scroll-container]'),
  smooth: true,
  smoothMobile: true,
  lerp: .07,

locoScroll.on("scroll", ScrollTrigger.update);
ScrollTrigger.scrollerProxy(".wrapper", {
  scrollTop(value) {
    return arguments.length ? locoScroll.scrollTo(value, 0, 0) : locoScroll.scroll.instance.scroll.y;
  getBoundingClientRect() {
    return {
      top: 0,
      left: 0,
      width: window.innerWidth,
      height: window.innerHeight
  pinType: document.querySelector(".wrapper").style.transform ? "transform" : "fixed"

ScrollTrigger.addEventListener("refresh", () => locoScroll.update());

window.addEventListener('DOMContentLoaded', () => {
  gsap.fromTo('.test', { //アニメーションしたい要素を指定
    x: 0,
      xPercent: 20,
      duration: 1,
    rotate: 360,

      scrollTrigger: {
        trigger: '.test',//アニメーションが始まるトリガーとなる要素
        start: 'top 50%', //アニメーションが始まる位置を指定
        scroller: ".wrapper",
        markers: true,