Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <!-- <div class="home panel blue">
  <div>
    <h1 class="title-home">HOME PANEL</h1>
    <p class="text-home">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Magni repudiandae odit delectus illo dolore, corrupti provident, recusandae inventore nesciunt vero, modi non temporibus quaerat cum. Distinctio corrupti esse harum eos blanditiis, illo nostrum sapiente hic tempore. Doloribus quidem beatae et laborum! Iusto quasi quas, alias, est nihil magnam aspernatur accusamus aut ullam, ut eaque iste porro officia ex fugiat pariatur dolor vitae eligendi nobis rem. Quisquam nisi tempora laborum, odit ullam eos, laudantium necessitatibus nihil, aliquid ducimus id minus est incidunt. Quo eveniet ratione in fugit reprehenderit. Praesentium facilis quis deleniti optio incidunt voluptate ipsum eligendi beatae! Ex et quasi pariatur natus sit, odit magnam quaerat suscipit deserunt libero.</p>
    <div class="arrow"></div>
  </div>
</div> -->

<div id="container">
  <section class="panel red">
    <h1 class="title-1">PANEL ONE</h1>
    <p class="text-1">Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid, ullam. Doloremque soluta fugiat ipsum similique, ipsa nobis temporibus sunt iste. Voluptate et neque, porro, dolorem dicta nobis laborum quidem nostrum voluptatem quae maxime consequatur placeat dolore ullam nihil doloribus asperiores eos dolorum necessitatibus laudantium recusandae possimus? Commodi, consequuntur maiores possimus error minima sint vitae ipsam suscipit ad deserunt. Dolorem unde laboriosam mollitia perferendis quasi quae ad explicabo minus impedit omnis ab veritatis ullam alias ducimus labore nam animi quibusdam iure libero nisi aperiam, quam perspiciatis corporis tenetur. Eos voluptas iste, doloribus quisquam debitis ipsam? Explicabo numquam suscipit hic qui assumenda.</p>
    <div class="big-text">BIG TEXT</div>
  </section>
  <section class="panel orange">
    <h1 class="title-2">PANEL TWO</h1>
    <div class="left-box">
      <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Animi libero cumque maxime tempora itaque ut explicabo vero dolorum, dicta accusantium. Nulla iusto perspiciatis saepe voluptatem quis ab similique eveniet neque beatae, obcaecati ipsam quo aliquam tempora quod ut ad excepturi quae doloremque.</p>
    </div>
    <div class="right-box">
      <p>Amet numquam incidunt fuga quisquam doloribus excepturi, veritatis magnam error blanditiis. Ipsum, est! Hic, non eveniet consectetur minima qui reiciendis officiis totam ducimus aliquid inventore perferendis vitae quibusdam quasi ad debitis dolorem vero eaque, consequatur distinctio pariatur expedita commodi dolor.</p>
    </div>
  </section>
  <section class="panel purple">
    <h1>PANEL THREE</h1>
    <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Animi libero cumque maxime tempora itaque ut explicabo vero dolorum, dicta accusantium. Nulla iusto perspiciatis saepe voluptatem quis ab similique eveniet neque beatae, obcaecati ipsam quo aliquam tempora quod ut ad excepturi quae doloremque, optio repellat? Amet numquam incidunt fuga quisquam doloribus excepturi, veritatis magnam error blanditiis. Ipsum, est! Hic, non eveniet consectetur minima qui reiciendis officiis totam ducimus aliquid inventore perferendis vitae quibusdam quasi ad debitis dolorem vero eaque, consequatur distinctio pariatur expedita commodi dolor. Illum, a perferendis. Alias debitis facilis deleniti mollitia in ipsum accusantium voluptatem esse. Facilis, repellat quas.</p>
  </section>
  <section class="panel green">
    <h1>PANEL FOUR</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores, omnis! Corrupti, voluptatum tempore! Magni, veritatis veniam vitae sed quam facilis architecto reprehenderit, delectus alias, corporis tenetur. Officia, blanditiis pariatur eius quos quaerat alias autem optio illo quasi temporibus atque amet, praesentium dicta beatae deserunt omnis. Autem obcaecati pariatur eius molestias minima reiciendis voluptatem distinctio sunt. Aliquid provident aut reiciendis quia, qui cupiditate earum asperiores ipsam in id ut labore et minima architecto suscipit unde vel numquam atque sequi. Aspernatur a quidem eum modi, corporis et animi distinctio eligendi in ratione velit facere numquam. Quaerat iste earum similique beatae eaque provident.</p>
  </section>
  <section class="panel grey">
    <h1>PANEL FIVE</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores, omnis! Corrupti, voluptatum tempore! Magni, veritatis veniam vitae sed quam facilis architecto reprehenderit, delectus alias, corporis tenetur. Officia, blanditiis pariatur eius quos quaerat alias autem optio illo quasi temporibus atque amet, praesentium dicta beatae deserunt omnis. Autem obcaecati pariatur eius molestias minima reiciendis voluptatem distinctio sunt. Aliquid provident aut reiciendis quia, qui cupiditate earum asperiores ipsam in id ut labore et minima architecto suscipit unde vel numquam atque sequi. Aspernatur a quidem eum modi, corporis et animi distinctio eligendi in ratione velit facere numquam. Quaerat iste earum similique beatae eaque provident.</p>
  </section>
</div>

<div class="panel blue">
  <div>
    <h1>VERTICAL PANEL</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta eum facere consequuntur quas modi animi iure inventore quia repellendus? Fuga aliquid error nostrum, sint mollitia architecto quisquam ipsa iste accusantium debitis vitae pariatur enim, deserunt iusto ex beatae commodi fugiat quas culpa tempore qui aperiam iure. Ab unde sequi repellat, dolorem commodi cum dolorum omnis repudiandae, et laborum itaque sunt a placeat! Adipisci veniam architecto tenetur veritatis accusamus nesciunt tempore! Nihil animi veniam incidunt quaerat, sequi perferendis debitis tenetur odio veritatis. Nihil ratione nam delectus at, iusto, ad praesentium adipisci quidem repellat explicabo blanditiis excepturi voluptatum consequatur quam officiis veniam.</p>
  </div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;800;900&display=swap");

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

html,
body {
  margin: 0;
  height: 100vh;
  font-size: 10px;
  -webkit-overflow-scrolling: touch;
  font-family: "Montserrat", sans-serif;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

#container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.panel {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 1.6rem;
  text-align: center;
  color: white;
  padding: 1rem;
}

/* style panels and panel content */

h1,
h2,
p,
li {
  max-width: 800px;
}

.panel h1 {
  font-size: 6rem;
  color: black;
  font-weight: 300;
  margin-bottom: 5rem;
}

.panel p,
.panel li {
  color: black;
  font-weight: 400;
  text-align: left;
  line-height: 2;
  margin-bottom: 5rem;
}

.panel.home {
  position: relative;
}

.panel.orange {
  flex-direction: row;
}

/* panel colours */

.blue {
  background-color: #2c7ad2;
}

.orange {
  background-color: #e77614;
}

.red {
  background-color: #c82736;
}

.purple {
  background-color: #8d3dae;
}

.green {
  background-color: #28a92b;
}

.grey {
  background-color: #555555;
}

/* text animations */

.title-home,
.text-home {
  opacity: 0;
}

.panel .title-1,
.panel .text-1 {
  opacity: 0;
}

.panel .big-text {
  position: absolute;
  font-size: 150px;
  top: 25%;
  opacity: 0;
}

.title-2 {
  position: absolute;
  top: 5rem;
}

.left-box,
.right-box {
  margin: 2rem;
  padding: 20px;
  width: 30%;
  height: 50%;
  background-color: darkorange;
  opacity: 0.3;
}

/* boring stuff */

.arrow {
  position: relative;
  top: 10px;
  margin: 0 auto;
  width: 40px;
  height: 40px;
  background-image: url(../img/pngegg.png);
  background-size: contain;
  font-size: 12px;
  font-weight: 400;
}

              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);
gsap.defaults({ ease: "none", duration: 2 });

// home panel title and text fade-in

gsap.to(".title-home", { opacity: 1, duration: 0.5 });
gsap.to(".text-home", { opacity: 1, duration: 0.5 }).delay(0.5);

// create a sequence that moves 3 of the panels in from different directions
const tl = gsap.timeline({
  // scrollTrigger: {
  //   trigger: "#container",
  //   start: "top top",
  //   end: "+=5000",
  //   scrub: 1,
  //   markers: true,
  //   pin: true,
  //   anticipatePin: 1,
  //   snap: {
  //     snapTo: "labels" // snap to the closest label in the timeline
  //   }
  // }
});

tl.addLabel("one")
  .to(".title-1", { opacity: 1, duration: 1 })
  .to(".text-1", { opacity: 1, duration: 1 })
  .fromTo(".big-text", { left: 0 }, { right: 0, duration: 3, opacity: 0.5 })
  .from(".orange", { xPercent: -100 })
  .from(".left-box", { opacity: 0, duration: 1 })
  .from(".right-box", { opacity: 0, duration: 1 })
  .addLabel("two")
  .from(".purple", { xPercent: 100 })
  .addLabel("three")
  .from(".green", { yPercent: -100 })
  .addLabel("four")
  .from(".grey", { xPercent: 100 })
  .addLabel("five");

              
            
!
999px

Console