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=container>
	<div id="proparallax">
		<img class="one" src="https://images.wallpaperscraft.com/image/leaves_plant_green_118405_800x600.jpg" /> 
		<img class="two" src="https://images.wallpaperscraft.com/image/cubes_shape_glow_background_85043_800x600.jpg" />
		<img class="three" src="https://images.wallpaperscraft.com/image/wave_sea_water_transparent_splashes_26417_800x600.jpg" />
	</div>
</div>
              
            
!

CSS

              
                body {
	font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
	width: 100%;
	min-height: 45rem;
	font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
	text-align: center;
	background-color: whitesmoke;
}
.container {
	width:100%;
	padding-right:15px;
	padding-left:15px;
	margin-right:auto;
	margin-left:auto;
	max-width:800px
}
/* Basic appearance stuff ends here */

/* Parallax Horizontal Scroller - by Bree Dulmage, 2020 */
#proparallax {
	display: block;
	position: relative;
	overflow: hidden;
	min-height: 37.5rem;
	border: 10px solid black;
	box-shadow: 0px 8px 10px 8px grey;
}	

#proparallax img {
	position: absolute;
	width: 50rem;
	height: 37.5rem;
	overflow: hidden;
	object-fit: cover;
}

@keyframes parallax_one { /* controls img.one movement */
	0% { /* .imageloaded */
		height: 37.5rem;
		width: 50rem;
		left: 0rem;
		opacity: 1;
	}
	/* .imagehold runs from 0 to 27.77% */
	27.77% { /* .imageloaded */
		width: 50rem;
		left: 0rem;
	}
	27.78% { /* .imagepreunload */
		width: 50rem;
		left: 0rem;
		right: 50rem;
	}
	33.33% { /* .imageunloaded */
		height: 37.5rem;
		width: 0rem;
		left: 0rem;
		right: 0rem;
		opacity: 1;
	}
	33.34% { /* imageoff */
		opacity: 0;	
	}
	94.43% { /* .imageon */
		left: 0rem;
		opacity: 0;
	}
	94.44% { /* .imageinitial */
		height: 37.5rem;
		width: 0rem;
		left: 50rem;
		opacity: 1;
	}
	100% { /* .imageloaded */
		width: 50rem;
		left: 0rem;
		opacity: 1;		
	}
}

@keyframes parallax_two { /* controls img.two movement */
	0% { /* .imageoff */
		opacity: 0;
	}
	27.77% { /* .imageon */
		left: 0rem;
		opacity: 0;
	}
	27.78% { /* .imageinitial */
		width: 0rem;
		height: 37.5rem;
		left: 50rem;
		opacity: 1;
	}
	33.33% { /* .imageloaded */
		width: 50rem;
		left: 0rem;
	}
	/* .imagehold runs from 33.34% - 61.10% */
	61.10%{ /* .imageloaded */
		width: 50rem;
		left: 0rem;
	}
	61.11% { /* .imagepreunload */
		width: 50rem;
		left: 0rem;
		right: 50rem;
	}
	66.67% { /* .imageunloaded */
		width: 0rem;
		right: 0rem;
		left: 0rem;
		height: 37.5rem;
		opacity: 1;
	}
	66.68% { /* .imageoff */
		opacity: 0;
	}
	100% { /* .imageoff */
		opacity: 0;
	}
}

@keyframes parallax_three { /* controls img.three movement */
	0% { /* .imageoff */
		opacity: 0;
	}
	61.10%{ /* .imageon */
		opacity: 0;
	}
	61.11% { /* .imageinitial */
		width: 0rem;
		height: 37.5rem;
		left: 50rem;
		opacity: 1;		
	}
	66.67% { /* .imageloaded */
		width: 50rem;
		left: 0rem;
	}
	/* .imagehold runs from 66.67% - 94.43% */
	94.43% { /* .imageloaded */
		width: 50rem;
		left: 0rem;
	}
	94.44% { /* .imagepreunload */
		width: 50rem;
		left: 0rem;
		right: 50rem;
	}
	100% { /* imageunloaded */
		width: 0rem;
		right: 0rem;
		left: 0rem;
		height: 37.5rem;
		opacity: 1;
	}
}

#proparallax img.one{
	animation-name: parallax_one; /* controls img.one movement */
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: 18s;
	animation-direction: forwards;
	object-fit: cover;
}

#proparallax img.two {
	animation-name: parallax_two; /* controls img.two movement */
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: 18s;
	animation-direction: forwards;
	object-fit: cover;
}

#proparallax img.three {
	animation-name: parallax_three; /* controls img.three movement */
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: 18s;
	animation-direction: forwards;
	object-fit: cover;
}
              
            
!

JS

              
                
              
            
!
999px

Console