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

              
                <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Color Scroll</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
    <link rel="stylesheet" href="./Text Color Scroll.css">
</head>

<body>


    <section class="text-color-scroll-section"></section>

    <section class="text-color-two-columns" id="textColorTwoColumns">
        <div class="text-color-left-column">
            <h1 class="text-color-left-column-h1">
                The Colonel
            </h1>
        </div>
        <div class="text-color-right-column">
            <p class="text-color-right-column-paragraph">
                Colonel Alexandros Maniatis, a respected military man, took it upon himself to investigate the case.
                Maniatis began his investigation in Palamidi, a well-known refuge for illegals. There he discovered that
                Louris often met with Aikaterini Vassiliou, a teacher rumored to be involved in scandals.
            </p>
            <p class="text-color-right-column-sub">
                Is Aikaterini Vassiliou involved in scandals?
            </p>
        </div>
    </section>



<section class="text-color-scroll-section"></section>





    <script src='https://unpkg.co/gsap@3/dist/gsap.min.js'></script>
    <script src='https://unpkg.com/gsap@3/dist/ScrollTrigger.min.js'></script>
    <script src='https://assets.codepen.io/16327/SplitText3.min.js'></script>
    <script src="./Text Color Scroll.js"></script>
    <script src="./Text Color Scroll2.js"></script>
    <script src="./Entrance Animation.js"></script>
    <script src="./Entrance Animation2.js"></script>
</body>

</html>
              
            
!

CSS

              
                /* ----------------Styling---------------- */
@font-face {
    font-family: "Typewriter";
    src: url("./Typewriter.ttf");
}

@font-face {
    font-family: "Cometus";
    src: url("./Cometus.ttf");
}

@font-face {
    font-family: "Caliope";
    src: url("./Caliope.ttf");
}

:root {
    --green: #708c6e;
    --beige: #fceeda;
    --red: #b9282f;
    --anth: #1e1b1e;
    --gif-texture: url(https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExYXJiamNpaW9sOTlpenRsZDRxc25sYzBlbzFscWtya2Z0NGV1YXFqdCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/dB66K4Kywc8gPVh6A7/giphy.webp);
}

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

body {
    background-color: var(--green);
}

body::before {
    content: "";
    position: fixed;
    background-size: cover;
    background-repeat: repeat;
    background-image: var(--gif-texture);
    mix-blend-mode: overlay;
    z-index: 3;
    height: 100%;
    width: 100%;
    opacity: 10%;
    overflow: hidden;
}

/* ----------------Styling---------------- */




/* ----------------Text Color Scroll---------------- */
.text-color-scroll-section {
    width: 100%;
    height: 100vh;
}
/* ----------------Text Color Scroll---------------- */





/* ----------------Text Color Scroll Two Columns---------------- */
.text-color-two-columns {
    border: greenyellow 2px dotted;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: start;
}

.text-color-left-column {
    border: purple 2px solid;
    width: 50%;
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 120px;
}

.text-color-left-column h1 {
    border: #1e1b1e dashed 2px;
    font-size: 90px;
    font-family: "Caliope";
    color: var(--red);
 }

 .text-animation-entrance {
    -webkit-animation: fade-in-bottom 2.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    animation: fade-in-bottom 2.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
 }

.text-color-right-column {
    border: purple 2px solid;
    padding: 10px;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    margin-top: 350px;
}

.text-color-right-column-paragraph {
    border: #1e1b1e dashed 2px;
    font-size: 20px;
    font-family: "Cometus";
    color: var(--beige);
}

.text-color-right-column-sub {
    border: #1e1b1e dashed 2px;
    color: var(--anth);
}

/* ----------------Text Color Scroll Two Columns---------------- */





/* ----------------Animations---------------- */

 @-webkit-keyframes fade-in-bottom {
    0% {
      -webkit-transform: translateY(50px);
              transform: translateY(50px);
      opacity: 0;
    }
    100% {
      -webkit-transform: translateY(0);
              transform: translateY(0);
      opacity: 1;
    }
  }
  @keyframes fade-in-bottom {
    0% {
      -webkit-transform: translateY(50px);
              transform: translateY(50px);
      opacity: 0;
    }
    100% {
      -webkit-transform: translateY(0);
              transform: translateY(0);
      opacity: 1;
    }
  }
  

/* ----------------Animations---------------- */







/* ----------------Responsivness---------------- */
@media (max-width: 600px) {}

/* ----------------Responsivness---------------- */
              
            
!

JS

              
                console.clear();

gsap.registerPlugin(SplitText, ScrollTrigger);

const split2 = new SplitText(".text-color-right-column-paragraph", {
    type: "words"
});


const tl2 = gsap.timeline({
    scrollTrigger: {
        trigger: "#textColorTwoColumns",
        start: "top top",
        end: "+=150%",
        // end: "bottom +=1000px", works with the scroll1
        pin: true,
        scrub: 0.75,
        markers: true
    }
}).

    set(split2.words, {
        color: "#b9282f",
        stagger: 0.1
    },
        0.1);
              
            
!
999px

Console