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.


                <section class="dummy-section">
  <h1>Extra space just for demo, remove this</h1>

<section class="actual-section">
<!--   <img class="background" src="" /> -->
  <div class="paragraph">
    <p>Excepteur officia Lorem esse tempor id consectetur.</p>
    <p>Ullamco dolore magna duis pariatur culpa labore occaecat velit.</p>
    <p>Nostrud laboris aliquip eiusmod pariatur quis et est incididunt laboris enim in pariatur elit aliquip.</p>

<section class="dummy-section">
  <h1>Extra space just for demo, remove this</h1>


  background-color: #000;
  color: #fff;
  font-weight: 700;
  font-size: 4vw;
  max-width: 500px;
  margin-top: 70vh;
.background {
  position: absolute; 
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-size: cover;
.line {
  position: relative;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  --highlight-offset: 0%;

  background-image: linear-gradient(
    rgba(255, 255, 255, 1) var(--highlight-offset),
    rgba(255, 255, 255, 0.2) var(--highlight-offset)
.actual-section {
  position: relative;
  width: 100vw;
  height: 100vh;
.dummy-section {
  width: 100vw;
  height: 100vh;
  background-color: gray;



                const splitText = new SplitText(".paragraph p", {
  type: "lines",
  linesClass: "line"

const tl = gsap.timeline({
  scrollTrigger: {
    pin: '.background',
    pinSpacing: false,
    trigger: ".paragraph",
    scrub: 1,
    start: "top 65%",
    end: "bottom 65%",
    markers: true
});".line", {
  "--highlight-offset": "100%",
  stagger: 0.5