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="section">
	<div class="section_text">SCROLL DOWN</div>
</div>

<!-- SYSTEME TEXT MITTE -->
<div class="wrapper_in text_gray fullscreen animate_change_color">
	<div class="text_ani_color">
		<h2>Headline.</h2>
		<div class="text_ani_text text_animate">
			<p class="" style="color: #E1E1E1">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.</p>
		</div>
		<div class="clear"></div>
	</div>
</div>

<div class="section">
	<div class="section_text">END</div>
</div>
              
            
!

CSS

              
                * {
	padding: 0;
	margin: 0;
}
a {
	transition: all 0.5s ease 0s;
    color: #0563c1;
    text-decoration: none !important;
}
a:hover {
    text-decoration: none !important;
}
.clear {
	clear: both;
}
.dn {
	display: none;
}
html {
	-webkit-text-size-adjust: none; /* Prevent font scaling in landscape */
}
body {
	/*font-family: 'Cabin', sans-serif;*/
	-webkit-hyphens: auto;
	-moz-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
	font-size: 16px;
}
.section {
	width: 100%;
	height: 100vh;
	position: relative;
	background: #E8E8E8;
}
.section_text {
	width: 100%;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 100px;
	text-align: center;
}
.wrapper_in {
	margin: 0 auto;
	max-width: 960px;
}
.text_gray {
	color: #BABABA;
}
.fullscreen {
	height: 100vh;
	position: relative;
	width: 100% !important;
	overflow: hidden;
}
.text_ani_color {
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	font-family: roboto-condensed, sans-serif;
	font-weight: 300;
	font-style: normal;
	font-size: 20px;
}
.text_ani_color h2 {
	font-size: 90px;
	font-family: roboto, sans-serif;
	font-weight: 700;
	font-style: normal;
	letter-spacing: 8px;
	padding-bottom: 40px;
}.text_ani_text {
  float: right;
  max-width: 700px;
  margin-left: 100px;
}
.text_ani_text {
  float: right;
  max-width: 700px;
  margin-left: 100px;
}
.text_animate p {
	width: 100%;
	right: 0;
	font-family: "Roboto Condensed", sans-serif;
	font-weight: 300;
	font-style: normal;
	font-size: 20px;
}
.text_animate .color_over {
	color: #BABABA;
}
              
            
!

JS

              
                console.clear();

gsap.registerPlugin(SplitText, ScrollTrigger);

let change_text_color = document.querySelectorAll(".animate_change_color");

change_text_color.forEach((element) => {
  	console.log(change_text_color);

  	//gsap.set(".text_animate p.hidden_char", { opacity: 1 });

  	let animate = element.querySelectorAll(".text_animate p");
  	let split = new SplitText(animate, {
    	type: "chars",
		charsClass: "char",
		position: "absolute"
  	});

  	let tl = gsap.timeline({
      	scrollTrigger: {
        	trigger: element,
			start: "top top",
			end: "bottom+=500px top",
			pin: true,
			scrub: 0.75,
			markers: true,
			PinSpacing: true,
      	}
      	
    })
    tl.add(() => {}, "+=1")

    .set(
      	element.querySelectorAll(".char"),
	  	{
        	className: 'char color_over',
			stagger: 0.1
      	},
	  	0.1
    );
});
              
            
!
999px

Console