Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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

Save Automatically?

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

              
                <section id="section5" class="full-height">
	</section>

<section id="section1" class="color-change" data-color="#fac0b8">
	<div class="slide-container">
		<div id="slide1" class="slide">
			<div>
				<div id="bio-name">
					<h1>Hi, I’m Jane.</h1>
					
				</div>
				<p>Eget nulla facilisi etiam dignissim diam quis. Eu volutpat odio facilisis mauris sit amet massa vitae tortor. </p>
				<h2>I’ve been featured in:</h2>
				<div id="featured-logos" class="flex-row">
					<div class="feature-logo"></div>
					<div class="feature-logo"></div>
					<div class="feature-logo"></div>
					<div class="feature-logo"></div>
				</div>
		</div>
				</div>
		<div id="slide2" class="slide">
				<p>Ut ornare lectus sit amet est placerat in. Enim sed faucibus turpis in eu mi. Vitae purus faucibus ornare suspendisse sed nisi lacus sed. Dapibus ultrices in iaculis nunc sed augue lacus. Pellentesque elit ullamcorper dignissim cras. Sed faucibus turpis in eu mi bibendum neque egestas congue. Diam vel quam elementum pulvinar etiam non quam. Accumsan lacus vel facilisis volutpat. Consequat interdum varius sit amet mattis vulputate enim nulla. </p>

		</div>
		<div id="slide3" class="slide">
				<p>Massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Aliquet nibh praesent tristique magna. Vel orci porta non pulvinar neque laoreet suspendisse. Nec feugiat nisl pretium fusce id velit ut tortor pretium. Interdum velit laoreet id donec ultrices tincidunt arcu non sodales. Est ullamcorper eget nulla facilisi etiam. Ullamcorper malesuada proin libero nunc consequat interdum varius sit amet. </p>
		
		</div>
	</div>
</section>
<section id="section2">
	<div class="content-wrapper full-height">
		<h1>What’s included:</h1>
	</div>
</section>

<section id="section3">
	<div class="content-wrapper">
		<h1>Bonuses:</h1>
	</div>
	<svg id="wave-quote-path" viewBox="0 -20 1955.68 385.8">
		<path id="textPath" class="wave-quote" d="M.08 37.48C127.28 16.66 293 56.3 409.91 115.75s245.72 158.53 364.62 174.38 144.66-55.48 223.93-136.93 150.6-87 261.57-64.46 245.73 86.46 406.24 88.44S1955.76.29 1955.76.29" />

		<text>
			<textpath id="wave-quote" href="#textPath">The moment you think your voice is irrelevant is always when someone needs to read your words the most. Speak up!</textpath>
		</text>
	</svg>
	<div class="wave-divider2">
		<svg class="divider-wave2" viewBox="0 0 1955.68 385.8">
			<path d="M0 37.18C127.19 16.37 292.91 56 409.83 115.46S655.55 274 774.45 289.84s144.66-55.49 223.92-136.93S1149 65.91 1260 88.45s245.73 86.45 406.24 88.44S1955.68 0 1955.68 0v385.8H0z" data-name="Layer 1" />
		</svg>

</section>

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");

:root {
	--blue: #124fb4;
	--aqua: #91f6d5;
	--yellow: #ffe02c;
	--skyblue: #00b8f1;
	--pink: #fac0b8;
	--powderblue: #c9e9f7;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	/*   height: 100%;
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch; */
}

section {
	position: relative;
	height: 100%;
	width: 100%;
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
p,
a,
body {
	font-family: "Work Sans";
	text-align: left;
}

p,
body {
	font-size: 16px;
	line-height: 1.5;
	color: #0f0f0f;
}

h1 {
	font-weight: 700;
	font-size: 2.4rem;
	line-height: 1.3;
}

.jumbo {
	font-size: 4rem;
	font-weight: 800;
	line-height: 1.3;
	margin: 0;
	text-align: left;
}

.full-height {
	height: 100vh;
}

.centered {
	justify-content: center;
	justify-items: center;
	align-content: center;
	align-items: center;
}

.content-wrapper {
	padding: 4rem 10rem;
	display: flex;
	justify-content: center;
	flex-direction: column;
}

.first,
.second {
	width: 50%;
}

.wave-divider1 {
	height: 50vh;
	position: relative;
	padding-top: 15.7%;
	background-image: linear-gradient(#91f6d5, #91f6d5);
	background-origin: content-box;
	background-repeat: no-repeat;
	z-index: 100;
}

.divider-wave1 {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	fill: #91f6d5;
	z-index: 200;
}

#section1 {
	background: var(--aqua);
}

#section2 {
	background: var(--skyblue);
}

#section3 {
	background: white;
}

#section4 {
	background: var(--powderblue);
}

#section5 {
	background: var(--yellow);
}

.flex-col {
	display: flex;
	flex-direction: column;
}

.flex-row {
	display: flex;
	flex-direction: row;
}

#popout {
	fill: white;
	width: 400px;
}

#bio-pic,
#bio {
	width: 50%;
	text-align: center;
}

#featured-logos {
	width: 100%;
	display: flex;
	justify-content: flex-start;
}

.feature-logo {
	width: 50px;
	height: 30px;
	background: #55c497;
	padding: 0;
	margin-right: 20px;
}

#bio-name {
	display: flex;
	flex-direction: row;
	width: 100%;
	position: relative;
}

#checkmark {
	height: 80px;
	width: 100px;
}

.checkmark-badge {
	fill: #00c8e5;
}

.checkmark-check {
	fill: #fff;
}

.checkmark-star1,
.checkmark-star2,
.checkmark-star3 {
	fill: #00c8e5;
}

.wave-divider2 {
	height: 50vh;
	position: relative;
	padding-top: 15.7%;
	background-image: linear-gradient(#c9e9f7, #c9e9f7);
	background-origin: content-box;
	background-repeat: no-repeat;
	z-index: 0;
}

.divider-wave2 {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	fill: #c9e9f7;
	z-index: 0;
}

#textPath {
	fill: none;
}

#wave-quote {
	fill: black;
	font-size: 30px;
}

#wave-quote-path {
	position: absolute;
	z-index: 2;
}

.slide-container {
	width: 100%;
	height: 100%;
}

.slide {
	width: 100%;
	height: 100vh;
	padding: 0 24rem;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
}

#slide1 {
}

#slide2 {
}

#slide3 {
}

/* Splitting */

.word,
.char {
	animation-delay: var(--del);
	animation-direction: var(--dir, normal);
	animation-duration: var(--dur);
	animation-iteration-count: var(--it, infinite);
	animation-name: var(--name);
	animation-timing-function: var(--tf);
	animation-fill-mode: var(--fill, forwards);
	display: inline-block;
	position: relative;
	transform-origin: 50% 100%;
	z-index: 1;
}

.char {
	--name: float;
	--dur: 2200ms;
	--del: calc(var(--char-index) * -0.5s);
	--tf: ease-in-out;
	--dir: alternate;
}

.char:nth-child(2n) {
	--name: float-alt;
}

.splitting.char {
	animation: float 1s cubic-bezier(0.5, 0, 0.5, 1) both;
	animation-delay: calc(60ms * var(--char-index));
}

@keyframes float {
	from {
		transform: translate(2%, -10%) rotate(-1deg);
	}
	to {
		transform: translate(-2%, 5%) rotate(3deg);
	}
}

@keyframes float-alt {
	from {
		transform: translate(0%, -5%) rotate(-1deg);
	}
	to {
		transform: translate(2%, 10%) rotate(3deg);
	}
}

              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);
gsap.registerPlugin(MotionPathPlugin);
gsap.registerPlugin(Physics2DPlugin);
gsap.registerPlugin(ScrollToPlugin);
gsap.registerPlugin(MorphSVGPlugin);
gsap.registerPlugin(TextPlugin, EasePack);
Splitting();



let sections = gsap.utils.toArray(".slide"),
    currentSection = sections[0];

gsap.defaults({overwrite: 'auto', duration: 0.3});

// stretch out the body height according to however many sections there are. 
gsap.set(".slide-container", {height: (sections.length * 100) + "%"});

// create a ScrollTrigger for each section
sections.forEach((section, i) => {
  ScrollTrigger.create({
    // use dynamic scroll positions based on the window height (offset by half to make it feel natural)
    start: () => (i - 0.5) * innerHeight,
    end: () => (i + 0.5) * innerHeight,
    // when a new section activates (from either direction), set the section accordinglyl.
    onToggle: self => self.isActive && setSection(section)
  });
});

function setSection(newSection) {
  if (newSection !== currentSection) {
    gsap.to(currentSection, {scale: 1, autoAlpha: 0});
    gsap.to(newSection, {scale: 1, autoAlpha: 1});
    currentSection = newSection;
  }
}





gsap.utils.toArray(".color-change").forEach(function(elem) {

  let bgcolor = elem.getAttribute("data-color");
  
  ScrollTrigger.create({
    trigger: "#slide2",
    start:"center center",
		end:"bottom bottom",
    onEnter: () => gsap.to(elem, {backgroundColor:"#91f6d5"}),
    onLeave: () => gsap.to(elem, {backgroundColor:bgcolor}),
    onLeaveBack: () => gsap.to(elem, {backgroundColor:bgcolor}),
    onEnterBack: () => gsap.to(elem, {backgroundColor:"#91f6d5"})
	});
});

              
            
!
999px

Console