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="page-wrap">
  <header class="page-header">

    <h1>
      <div class="header-layer">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
      <div class="header-layer" aria-hidden="true">See the World</div>
    </h1>
    <img src="https://assets.codepen.io/t-1/juli-kosolapova-pZ-XFIrJMtE-unsplash.jpg" alt="A desert scene. Deep orange sand and a cloudy sky, with craggy hills and mountains looming in the distance. ">
    <!-- Photo by Juli Kosolapova for Unsplash. https://unsplash.com/photos/pZ-XFIrJMtE -->
  </header>
  <main class="page-main">
    <article>
      <h2>
        <div class="header-layer">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
        <div class="header-layer" aria-hidden="true">The journey of a thousand miles starts with a single step</div>
      </h2>
      <p><br>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dignissimos laborum cumque incidunt, enim ipsa dicta? Porro illo doloribus, consectetur eum exercitationem sit ipsam, est nesciunt maxime, eius animi dolor? Harum.</p>
      <img src="https://assets.codepen.io/t-1/saad-chaudhry-WdBu6PJ83uY-unsplash.jpg" alt="A distant view of a vast forest of evergreen trees covered with snow. A pink fog hovers close to the tops of the trees. ">
      <!-- Photo by Saad Chaudhry for Unsplash. https://unsplash.com/photos/WdBu6PJ83uY -->

      <h2>
        <div class="header-layer">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
        <div class="header-layer" aria-hidden="true">Expand Your Horizons</div>
      </h2>
      <img src="https://assets.codepen.io/t-1/claudel-rheault-ZVbv1akA-l4-unsplash.jpg" alt="A grassy field in a valley between green, grassy hills, beneath a sunlit sky filled with puffy clouds. ">
      <!-- image by Claudel Rheault for Unsplash. Full size at: https://unsplash.com/photos/ZVbv1akA-l4 -->

      <p>Sunt excepturi in nostrum, fugiat veritatis ab sit sequi nemo aperiam deserunt temporibus, dolorem ex adipisci autem. Quasi, iure fugiat! Nulla amet doloribus velit nam tempora, soluta consequatur doloremque omnis?</p>
      <h2>
        <div class="header-layer">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
        <div class="header-layer" aria-hidden="true">Explore and Reflect</div>
      </h2>
      <p> Aenean iaculis odio et eleifend elementum. Pellentesque porta lacus sit amet ligula tristique ornare. Ut euismod suscipit enim. Morbi eu molestie odio. Nullam pellentesque bibendum magna non aliquet. Praesent commodo metus ut dapibus sollicitudin. Etiam tristique arcu et risus venenatis egestas. Mauris quis feugiat leo. Mauris scelerisque eleifend risus a suscipit. Praesent commodo pharetra vehicula. Praesent imperdiet luctus ex eget consectetur. Sed facilisis lobortis dolor quis scelerisque. Pellentesque porta orci nec viverra semper.</p>
      <img src="https://assets.codepen.io/t-1/simon-berger-9Ct73yKbpEo-unsplash.jpg" alt="A waterfall, bathed in sunlight, pours down into a green river in a tropical forest. ">
      <!-- Photo by Simon Berger for Unsplash. https://unsplash.com/photos/9Ct73yKbpEo -->
      <p>In nec ornare mauris. Ut bibendum libero sit amet leo finibus ornare. Donec vel ultrices velit, vel congue elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam blandit sem nisi, eget fringilla risus tristique sit amet. Ut quis dictum massa, nec tincidunt urna. Aliquam dignissim mi at eros egestas elementum. Phasellus tempor lectus id consectetur finibus. Etiam felis augue, ullamcorper sed pretium dictum, interdum sed nulla. Morbi eu ante ac tortor suscipit posuere. Praesent feugiat, dolor sed condimentum tincidunt, massa tortor congue lorem, eget sollicitudin nulla nibh sit amet justo. Pellentesque erat quam, iaculis pellentesque eros non, accumsan laoreet quam.</p>
      <img src="https://assets.codepen.io/t-1/robert-bye-OlZ1nWLEEgM-unsplash.jpg" alt="A distant view of a cliffside beach. The water is deep blue and very calm.">
      <!-- photo by Robert Bye for Unsplash.  https://unsplash.com/photos/OlZ1nWLEEgM -->
      <p>Praesent nec lacus urna. Pellentesque hendrerit turpis sed dictum vehicula. Ut in sapien odio. Sed vitae finibus nisl. Pellentesque dui nisl, condimentum facilisis feugiat nec, dictum quis nisi. Donec pellentesque ornare mauris non congue. Integer consequat nulla at odio congue luctus.</p>
      <h2>
        <div class="header-layer">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
        <div class="header-layer" aria-hidden="true">Change Your Perspective</div>
      </h2>
      <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque lobortis mattis turpis eu commodo. Donec diam massa, convallis at ex non, finibus lacinia ipsum. Vestibulum rutrum nunc mollis condimentum mollis. Nunc at nunc mauris. Proin magna nisl, imperdiet imperdiet malesuada a, gravida ac dolor. Vivamus ex ipsum, convallis vitae egestas in, dignissim eu augue. Nullam euismod orci lectus, ut tempor mauris malesuada sit amet.</p>
      <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dignissimos laborum cumque incidunt, enim ipsa dicta? Porro illo doloribus, consectetur eum exercitationem sit ipsam, est nesciunt maxime, eius animi dolor? Harum.</p>
      <p>Illo numquam, sapiente neque repellendus facere amet doloribus asperiores quia eum? Sunt vero amet neque vel? Tempora, nulla voluptatum amet autem culpa magnam debitis! Dolores esse quam amet nobis ut.</p>
    </article>
  </main>
  <footer class="page-footer">
    3D Floating Headers<br><br>
    Made with 🤍 and 😜 by
    <a href="https://amitsh.com">Amit Sheen</a>
    for the
    <a href="https://codepen.io/tag/cpc-huge-headers/">
      Huge Headers CodePenChallenge
    </a>
  </footer>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Lora:400,400i,700");

*,
*::before,
*::after {
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

body {
  font-family: Lora, sans-serif;
  background-color: #555;
  color: #fff;
}

.page-wrap {
  width: 100%;
  height: 100vh;
  padding: 4em 1em;
  perspective: 1000px;
  overflow-x: hidden;
  overflow-y: scroll;

  img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    margin-block: 1em;
    box-shadow: 0 3px 6px #0004;
    border: 1px solid;
  }

  *:not(:empty) {
    transform-style: preserve-3d;
  }
}

.page-header {
  max-width: 650px;

  h1 {
    height: 100vh;
    display: grid;
    place-items: center;
    font-size: min(28vw, 191px);
    line-height: 0.9;
    --rx: 15deg;
    --ry: 15deg;

    @media (max-width: 682px) {
      transform: translateX(-0.15em);
    }
  }
}

.page-main {
  max-width: 650px;

  h2 {
    font-size: min(8vw, 62px);
    height: 5em;
  }
}

.header-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  text-align: center;
  color: hsl(0, 0%, var(--light, 0%));
  transform: translate(-50%, -50%) rotateX(var(--rx, 0)) rotateY(var(--ry, 0))
    translateZ(var(--tz, 0));

  &:nth-child(1) {
    filter: blur(6px);
    color: #0006;
  }

  @for $i from 0 to 20 {
    &:nth-child(#{$i + 2}) {
      --tz: #{$i * 1 + 100}px;
      --light: #{($i + 1) * 5}%;
    }
  }
}

footer {
  max-width: 650px;
  text-align: center;
  margin-top: 3em;
  border-top: 1px solid #fff3;
  padding-block: 3em;

  a {
    color: aquamarine;
    text-decoration: none;

    &:hover {
      color: aqua;
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console