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

              
                <main>
  <div class="asscroll-container">
<div class="inner">

    <!-- PAGE SPLIT COMPONENT 7/5 -->
    <section>
        <div class="container-fluid">
        <div class="row cmpnt--page-split cmpnt--page-split--57 cmpnt--page-split--image--border">
			      <div class="col-7 p-0 all-vh cmpnt--page-split--image" style="border-color: #F8F8F7;">
					    <img src="https://picsum.photos/600/800?random=5" width="600" height="540" class="ps__image--one" style="">
              <img src="https://picsum.photos/600/800?random=6" width="600" height="540" class="ps__image--two" style="">
				    </div>
            <div class="col-5 all-vh cmpnt--page-split--text">
                <div class="vertical-center vh">
                    <div class="vertical-el">

                    <p>Nunc commodo in lectus eu accumsan. Phasellus ac libero eu urna feugiat tempor. Nunc sit amet turpis lacus. Nam ultrices ac dolor quis rhoncus. Aliquam ac porttitor neque.</p>

                    </div>
                </div>
            </div>
			    </div>
        </div>
    </section>
    <!-- END PAGE SPLIT COMPONENT 7/5 -->
  
    <!-- PAGE SPLIT COMPONENT 5/7 -->
    <section>
        <div class="container-fluid">
        <div class="row cmpnt--page-split cmpnt--page-split--57 cmpnt--page-split--image--border">

			    <div class="col-5 all-vh cmpnt--page-split--text">
                <div class="vertical-center vh">
                    <div class="vertical-el">

                    <p>Nunc commodo in lectus eu accumsan. Phasellus ac libero eu urna feugiat tempor. Nunc sit amet turpis lacus. Nam ultrices ac dolor quis rhoncus. Aliquam ac porttitor neque.</p>

                    </div>
                </div>
            </div>
			      <div class="col-7 p-0 all-vh cmpnt--page-split--image" style="border-color: #F8F8F7;">
					    <img src="https://picsum.photos/600/800?random=5" width="600" height="540" class="ps__image--one" style="">
              <img src="https://picsum.photos/600/800?random=6" width="600" height="540" class="ps__image--two" style="">
				    </div>	
			    </div>
        </div>
    </section>
	
    <!-- MORE COMPONENTS MAY GO HERE 
	  <section>
        <div class="container-fluid p-0">
				<p class="text-center">some other place to go</p>
		    </div>
	  </section>-->
    </div>
  </div>
</main>



</body>
</html>
              
            
!

CSS

              
                html,
	body {
		height:100%;
	}
	body {
		background-color: #F8F8F7;
		color: #000;
		font-size: 100%;
		font-weight: 400;
		line-height: 1.4;
		margin: 0;
		overflow-x: hidden;
		text-align: center;
	}

	main {
		height:100%;
		width: 100%;
	}

	.section {
		width: 100%;
		height: auto; 
		overflow: hidden;
		position: relative;
	}

	.container-fluid {
		padding: 0;
	}

	/*** LAYOUT ***/

	.all-vh {
		height: 100vh;
	}
	.vertical-center {
		display: table;
		position: relative;
		width: 100%;
		height: 100%;
	}
	.vertical-center.vh {
		height: 100%;
	}
	.vertical-center .vertical-el {
		display: table-cell;
		vertical-align: middle;
	}


	/*** TYPOGRAPHY ***/

	p {
		font-size: calc(1.25em + (3.5 - 1.25) * ((100vw - 20em) / (120 - 20)));
		font-weight: 300;
		line-height: 1; /* 0.85; */
		text-align: left;
	}
	@media only screen and (min-width:1920px) {
		p {
			font-size: 3.5rem; /* was 4.5rem */
		}   
	}
		
	/*** IMAGES ***/

	.img-cover {
		width: 100%;
		height: auto;
	}
	@media only screen and (min-width: 1024px) {
		.img-cover {
			object-fit: cover;
			height: 100vh;
		}
	}
	.img-sizing {
		max-width: 100%;
		height: auto;
	}
	@media only screen and (min-width:1920px) {
		.img-sizing {
			object-fit: contain;
			width: 100%; 
		}
	}


	/*** COMPONENTS ***/

/* PAGE SPLIT -- 7/5 or 5/7 */

@media screen and (orientation: portrait) { 
    .cmpnt--page-split .all-vh {
        height: auto;
        min-height: 50vh;
    }
    .cmpnt--page-split--text {
        padding: 0 2% 0 5%;
    }
}
@media screen and (max-height: 1024px) and (orientation: portrait) { 
    .cmpnt--page-split--text {
        padding: 0 10%;
    }
}
@media screen and (orientation: landscape) { 
    .cmpnt--page-split .all-vh {
        height: auto;
        min-height: 100vh;
    }
    .cmpnt--page-split--text {
        padding: 0 5%;
    }
    .cmpnt--page-split--text .pull-out,
    .cmpnt--page-split--text .quote {
        text-align: left;
    }
}
@media screen and (max-width: 1349px) and (orientation: landscape) { 
    .cmpnt--page-split--text .quote {
        font-size: calc(1.5em + (2.75 - 1.5) * ((100vw - 20em) / (120 - 20)));
    }    
}
.cmpnt--page-split--image {
	overflow: hidden;
	width: 100%;
}
.cmpnt--page-split--image img {
    width:100%;
    height:100%;
    object-fit:cover;
}
.cmpnt--page-split--image.rt img {
    object-position: right top;
}
.cmpnt--page-split--image.lt img {
    object-position: left top;
}
.cmpnt--page-split--image--border.cmpnt--page-split--75 .cmpnt--page-split--text {
		padding: 0;
		padding-right: calc(1em + (9.375 - 1) * ((100vw - 20em) / (120 - 20)));
}
.cmpnt--page-split--image--border.cmpnt--page-split--57 .cmpnt--page-split--text {
		padding: 0;
		padding-left: calc(1em + (9.375 - 1) * ((100vw - 20em) / (120 - 20)));
}
.cmpnt--page-split--image--border .cmpnt--page-split--image {
	border-style: solid;
	border-width: calc(1em + (9.375 - 1) * ((100vw - 20em) / (120 - 20)));
}
@media screen and (orientation: landscape) { 
    .ps__image--two {
        position: absolute;
        top: 0; 
        left:0;
    }
}

/*** GSAP ***/

	.pin-spacer {
	/*	background: rgba(255,0,0,0.3);*/
		margin:0 !important;
	}

              
            
!

JS

              
                document.addEventListener("DOMContentLoaded", function() {

	gsap.registerPlugin(ScrollTrigger);
  
  <!-- ASSCROLL -->
  
  var asscroll = new ASScroll.default({
			customScrollbar: true,
			disableOnTouch: true,
			scrollbarHandleEl: '.my-scrollbar-handle'
		});

		ScrollTrigger.defaults({
			scroller: '.inner'
		})

		ScrollTrigger.scrollerProxy(".inner", {
			scrollTop(value) {
				return arguments.length ? asscroll.scrollTo(value) : -asscroll.smoothScrollPos;
			},
			getBoundingClientRect() {
				return { top: 0, left: 0, width: window.innerWidth, height: window.innerHeight }
			}
			
		});

		asscroll.on("raf", ScrollTrigger.update);
		ScrollTrigger.addEventListener("refresh", () => asscroll.onResize());

		window.addEventListener("load", () => {
			var totalScroll = document.querySelector(".asscroll-container").scrollHeight - innerHeight;
			asscroll.enable(false, true, document.querySelector(".inner"));
		});
  
  <!-- END ASSCROLL -->
	
	var ps__wrapper,ps__i2,ps__i2_h;
	var ps__tl = gsap.timeline();
		
  gsap.utils.toArray("section").forEach(function(section) {

      if (section.querySelector('.cmpnt--page-split') !== null) {

						var ps__wrapper = section.querySelector(".cmpnt--page-split");
						var ps__i2 = section.querySelector(".ps__image--two");
						var ps__i2_h = ps__i2.offsetHeight;
						var ps__tl = gsap.timeline({ paused: true });
        
						ps__tl.from(ps__i2, { duration: 2, yPercent:100,},"+=0.1");

						ScrollTrigger.create({
						animation: ps__tl,
						//id: 'ps__' + i__ps,
						trigger: ps__wrapper,
						start: "top top",
						end: () => "+=" + ps__i2_h,
						toggleActions: "play none reverse none",
						scrub: true,
						pin: true,
						markers: true
						});
					
					}
    });

});
              
            
!
999px

Console