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 id="GSAP_start" class="h-[100dvh] fixed top-0 left-0 overflow-hidden z-20">
  <div class="outer3 grid grid-cols-3 h-[100dvh] bg-[#EDEAE5]">
    <div class="outer relative">
      <img decoding="async" class="el_img invisible" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
      <div class="outer_img overflow-hidden absolute w-full h-full bottom-0 left-0">
        <div class="d1 h-full translate-y-[-300%]">
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img1.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img2.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img3.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
        </div>
      </div>
    </div>
    <div class="outer relative"></div>
    <div class="outer relative">
      <img decoding="async" class="el_img invisible" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
      <div class="outer_img overflow-hidden absolute w-full h-full bottom-0 left-0">
        <div class="d2 h-full translate-y-[-300%]">
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img1.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img2.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img3.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
        </div>
      </div>
    </div>
    <div class="outer relative"></div>
    <div class="outer relative">
      <img decoding="async" class="el_img invisible" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
      <div class="outer_img overflow-hidden absolute w-full h-full bottom-0 left-0">
        <div class="d3 h-full translate-y-[-300%]">
          <!-- <div
                class="img1 block w-full h-full flex items-center justify-center text-center text-[#FD7000] font-bold text-4xl"
              >
                <div class="te">
                  ホテルで味わう<br />
                  絶品グルメ
                </div>
              </div> -->
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img1.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img2.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img3.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
        </div>
      </div>
    </div>
    <div class="outer relative"></div>
    <div class="outer relative">
      <img decoding="async" class="el_img invisible" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
      <div class="outer_img overflow-hidden absolute w-full h-full bottom-0 left-0">
        <div class="d4 h-full translate-y-[-300%]">
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img1.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img2.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img3.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
        </div>
      </div>
    </div>
    <div class="outer relative"></div>
    <div class="outer relative">
      <img decoding="async" class="el_img invisible" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
      <div class="outer_img overflow-hidden absolute w-full h-full bottom-0 left-0">
        <div class="d5 h-full translate-y-[-300%]">
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img1.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img2.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/img3.jpg" alt="" />
          <img decoding="async" class="el_img block w-full h-full object-cover aspect-video" src="https://assets.codepen.io/2916832/gsap_startbg.png" alt="" />
        </div>
      </div>
    </div>
  </div>
</div>
<div id="main" class="h-screen flex items-center justify-center">
  <span class="text-5xl font-bold">HELLO!</span>
</div>
              
            
!

CSS

              
                
              
            
!

JS

              
                function animStart() {
  const tl = gsap.timeline({ defaults: { duration: 0.5 } });

  tl.to([".d1", ".d2", ".d3", ".d4", ".d5"], {
    duration: 3,
    yPercent: 300,
    stagger: 0.1,
    ease: "power3.out"
  })
    .to("#GSAP_start", {
      duration: 2,
      delay: 1,
      height: 0,
      ease: "power4.out"
    })
    .from("#main", { y: 100, duration: 1 }, "-=2");
}
Pace.on("start", function () {
  console.log("start");
});

Pace.on("done", function () {
  console.log("done");
  animStart();
});

              
            
!
999px

Console