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

              
                <header>
  <h1>A Day in The Studio</h1>
</header>

<ul class="topics">
  <li><img src="https://source.unsplash.com/hUHzaiAHuUc" alt="" /></li>
  <li><img src="https://source.unsplash.com/b57RqS-nQ1c" alt="" /></li>
  <li><img src="https://source.unsplash.com/cTj8vbZeX44" alt="" /></li>
  <li><img src="https://source.unsplash.com/iB_h6EFRiKY" alt="" /></li>
  <li><img src="https://source.unsplash.com/N-VDzD5z71E" alt="" /></li>
  <li><img src="https://source.unsplash.com/Olg60_RTPc8" alt="" /></li>
</ul>

<dl>
  <dt>
    <div class="text-wrapper">
      <p class="sub-title">SPECIAL PICKUP</p>
      <p class="title">Fender / Stratocaster 1953</p>
      <p class="body">The Fender Stratocaster, colloquially known as the Strat, is a model of electric guitar designed from 1952 into 1954 by Leo Fender, Bill Carson, George Fullerton and Freddie Tavares.</p>
    </div>
  </dt>
  <dd>
    <img src="https://source.unsplash.com/fR8iTc4OE5E" alt="" />
  </dd>
</dl>

<section>
  <ul>
    <li><img src="https://source.unsplash.com/8UyvkH5BlYQ" alt="" /></li>
    <li><img src="https://source.unsplash.com/TVgcpjm7jxc" alt="" /></li>
    <li><img src="https://source.unsplash.com/DSjILstcB78" alt="" /></li>
    <li><img src="https://source.unsplash.com/iGfIBqufNns" alt="" /></li>
    <li><img src="https://source.unsplash.com/yrELDi9q5NA" alt="" /></li>
    <li><img src="https://source.unsplash.com/NPoOfEm06Po" alt="" /></li>
    <li><img src="https://source.unsplash.com/eV0iFMBipMA" alt="" /></li>
    <li><img src="https://source.unsplash.com/2ZWCDBuw1B8" alt="" /></li>
  </ul>
</section>

<footer>
  <h2>Epiphone</h2>
  <p>
    Unless you live under a rock it is probably common knowledge to you that Epiphone are actually a Gibson subsidiary. They began creating lutes and fiddles more than 140 years ago and were once Gibson's main arch top rival. Epiphone created guitars in the image of more expensive Gibsons but eventually their level of quality saw them beginning to outshine
    them with their Emporer, Delux, Broadway, and Triumph. Their elite series features much higher quality instruments.
  </p>
</footer>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Stint+Ultra+Condensed&display=swap");

* {
  padding: 0;
  margin: 0;
}

html,
body {
  width: 100%;
  height: 100%;
}

header {
  width: 100%;
  height: 100%;
  background: url(https://source.unsplash.com/ZIGI-0Br8Bg) no-repeat center
    center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;

  h1 {
    font-family: "Stint Ultra Condensed", cursive;
    font-size: 5rem;
    color: #efe3d0;
  }
}

.topics {
  display: flex;
  padding: 8rem 2rem;
  flex-wrap: wrap;
  list-style: none;

  li {
    width: calc(100% / 3 - 4rem);
    margin: 2rem;

    img {
      width: 100%;
      height: 235px;
      object-fit: cover;
    }
  }
}

dl {
  display: flex;
  width: 100%;
  height: 100%;
  background: #6f4c5b;
  justify-content: space-between;

  dt {
    padding: 2rem;
    width: calc(30% - 4rem);

    p {
      color: #efe3d0;
    }

    .sub-title {
      font-size: 1.5rem;
      text-align: center;
      letter-spacing: 3px;
      padding: 0 0 1rem 0;
      font-family: "Stint Ultra Condensed", cursive;
    }

    .title {
      font-size: 5rem;
      line-height: 5rem;
      letter-spacing: 1px;
      font-family: "Stint Ultra Condensed", cursive;

      &:after {
        content: "";
        display: block;
        padding: 0 0 2rem 0;
        margin: 0 0 2rem 0;
        border-bottom: 1px solid #efe3d0;
        width: 3rem;
      }
    }

    .body {
      font-size: 1rem;
      line-height: 2rem;
      letter-spacing: 1px;
    }
  }

  dd {
    width: 100%;
    height: 100%;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
}

section {
  background: #efe3d0;
  min-height: 100%;
  position: relative;
  overflow: hidden;

  ul {
    display: flex;
    list-style: none;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);

    li {
      min-width: calc(100% / 3);
      height: 20rem;
      margin: 0 2rem;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }
  }
}

footer {
  padding: 8rem 4rem;
  background: #303030;
  color: #efe3d0;

  h2 {
    font-size: 5rem;
    line-height: 5rem;
    letter-spacing: 1px;
    font-family: "Stint Ultra Condensed", cursive;
    text-align: center;

    &:after {
      content: "";
      display: block;
      padding: 0 0 2rem 0;
      margin: 0 auto 2rem auto;
      border-bottom: 1px solid #efe3d0;
      width: 3rem;
    }
  }

  p {
  }
}

              
            
!

JS

              
                gsap.set("header", {
  transform: "scale(0.8)",
  autoAlpha: 0
});

gsap.to("header", {
  transform: "scale(1)",
  delay: "0.5",
  duration: "1",
  autoAlpha: 1,

  scrollTrigger: {
    trigger: "header",
    start: "100% 100%"
  }
});

// topics
gsap.set(".topics li", {
  autoAlpha: 0,
  y: 32
});

gsap.to(".topics li", {
  autoAlpha: 1,
  y: 0,

  stagger: {
    each: 0.1
  },

  scrollTrigger: {
    trigger: ".topics",
    start: "100% 100%"
  }
});

// stratocaster
gsap.set("dt", {
  x: "-100%",
  autoAlpha: 0
});

gsap.to("dt", {
  duration: 0.5,
  x: "0",
  autoAlpha: 1,

  scrollTrigger: {
    trigger: "dt",
    start: "50% 100%"
  }
});

gsap.set("dd", {
  autoAlpha: 0
});

gsap.to("dd", {
  autoAlpha: 1,
  delay: 0.5,
  duration: 0.5,

  scrollTrigger: {
    trigger: "dd",
    start: "50% 100%"
  }
});

// list
gsap.to("section ul", {
  x: "-210%",

  scrollTrigger: {
    trigger: "section",
    start: "0 0",
    scrub: true,
    pin: true
  }
});

// footer
gsap.set("footer h2 ,footer p", {
  y: "1rem",
  autoAlpha: 0
});

gsap.to("footer h2 ,footer p", {
  delay: "0.5",
  duration: "0.5",
  y: "0",
  autoAlpha: 1,

  scrollTrigger: {
    trigger: "footer h2 ,footer p",
    start: "50% 100%"
  }
});

              
            
!
999px

Console