css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              	<div id="intro" data-0="top:25%" data-300="top:-100%;">
		<div class="scroll">
			<p>victor</p>
		</div>
	</div>

<div id="FACE">
	<div id="topHead"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/1-tophead.png" data-0="top:-220px;" data-500="top:30px;"></div>
	<div id="leftBrow" ><img src="https://gups.co.uk/parallax-my-cartoon-face/img/2-leftbrow.png" data-200="top:-200px;" data-700="top:155px;"></div>
	<div id="rightBrow"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/3-rightbrow.png" data-400="top:-200px;" data-900="top:155px;"></div>
	<div id="nose"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/5-nose.png" data-600="top:-200px;" data-1100="top:280px;"></div>
	<div id="glasses"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/4-glasses.png" data-800="top:-200px;" data-1300="top:200px;"></div>
	<div id="righteyer"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/9-righteyer.png" data-1000="transform:scale(0);opacity:0;" data-1500="transform:scale(1);opacity:1;"></div>
	<div id="lefteyer"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/8-lefteyer.png" data-1100="transform:scale(0);opacity:0;" data-1600="transform:scale(1);opacity:1;"></div>
	<div id="rightear"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/6-rightear.png" data-1000="top:-200px;" data-1500="top:240px;"></div>
	<div id="leftear"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/7-leftear.png" data-1100="top:-200px;" data-1600="top:240px;"></div>
	<div id="rightsiggle"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/11-rightsiggle.png" data-1200="top:-200px;" data-1700="top:325px;"></div>
	<div id="leftsiggle"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/10-leftsiggle.png" data-1300="top:-200px;" data-1800="top:325px;"></div>
	<div id="tash"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/12-tash.png" data-1400="bottom:-200px; opacity:0;" data-1900="bottom:200px; opacity:1;"></div>
	<div id="beard"><img src="https://gups.co.uk/parallax-my-cartoon-face/img/13-beard.png" data-1500="bottom:-350px; opacity:0;" data-2000="bottom:-30px; opacity:1;"></div>
</div>
		<div id="progress" data-0="height:0%;background:hsl(200, 100%, 50%);" data-end="height:100%;background:hsl(920, 100%, 50%);"></div>

<!--
	<div id="bg1" data-0="background-position:0px 0px;" data-end="background-position:-500px -10000px;"></div>
	<div id="bg2" data-0="background-position:0px 0px;" data-end="background-position:-500px -8000px;"></div>
	<div id="bg3" data-0="background-position:0px 0px;" data-end="background-position:-500px -6000px;"></div>


	<div id="intro" data-0="opacity:1;top:3%;transform:rotate(0deg);transform-origin:0 0;" data-500="opacity:0;top:-10%;transform:rotate(-90deg);">
		<h1><a href="https://github.com/Prinzhorn/skrollr">skrollr</a></h1>
		<h2>parallax scrolling for the masses</h2>
		<p>let's get scrollin' ;-)</p>
		<p class="arrows">▼&nbsp;▼&nbsp;▼</p>
	</div>

	<div id="transform" data-500="transform:scale(0) rotate(0deg);" data-1000="transform:scale(1) rotate(1440deg);opacity:1;" data-1600="" data-1700="transform:scale(5) rotate(3240deg);opacity:0;">
		<h2>transform</h2>
		<p>scale, skew and rotate the sh** out of any element</p>
	</div>

	<div id="properties" data-1700="top:100%;" data-2200="top:0%;" data-3000="display:block;" data-3700="top:-100%;display:none;">
		<h2>all numeric properties</h2>
		<p>width, height, padding, font-size, z-index, blah blah blah</p>
	</div>

	<div id="easing_wrapper" data-0="display:none;" data-3900="display:block;" data-4900="background:rgba(0, 0, 0, 0);color[swing]:rgb(0,0,0);" data-5900="background:rgba(0,0,0,1);color:rgb(255,255,255);" data-10000="top:0%;" data-12000="top:-100%;">
		<div id="easing" data-3900="left:100%" data-4600="left:25%;">
			<h2>easing?</h2>
			<p>sure.</p>
			<p>let me dim the <span data-3900="" data-4900="color[swing]:rgb(0,0,0);" data-5900="color:rgb(255,255,0);">lights</span> for this one...</p>
			<p data-5900="opacity:0;font-size:100%;" data-6500="opacity:1;font-size:150%;">you can set easings for each property and define own easing functions</p>
		</div>

		<div class="drop" data-6500="left:15%;bottom:100%;" data-9500="bottom:0%;">linear</div>
		<div class="drop" data-6500="left:25%;bottom[quadratic]:100%;" data-9500="bottom:0%;">quadratic</div>
		<div class="drop" data-6500="left:35%;bottom[cubic]:100%;" data-9500="bottom:0%;">cubic</div>
		<div class="drop" data-6500="left:45%;bottom[swing]:100%;" data-9500="bottom:0%;">swing</div>
		<div class="drop" data-6500="left:55%;bottom[WTF]:100%;" data-9500="bottom:0%;">WTF</div>
		<div class="drop" data-6500="left:65%;bottom[inverted]:100%;" data-9500="bottom:0%;">inverted</div>
		<div class="drop" data-6500="left:75%;bottom[bounce]:100%;" data-9500="bottom:0%;">bounce</div>
	</div>

	<div id="download" data-10000="top[cubic]:100%;border-radius[cubic]:0em;background:rgb(0,50,100);border-width:0px;" data-12000="top:10%;border-radius:2em;background:rgb(190,230,255);border-width:10px;">
		<h2>the end</h2>
		<p>by the way, you can also animate colors (you did notice this, didn't you?)</p>
		<p><strong>Now get this thing on <a href="https://github.com/Prinzhorn/skrollr">GitHub</a> and spread the word, it's open source!</strong> <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://prinzhorn.github.com/skrollr/" data-via="Prinzhorn">Tweet</a>
		<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
		<p>Check out more <a href="https://github.com/Prinzhorn/skrollr/tree/master/examples#examples">examples</a>.</p>
		<p>Handcrafted by <a href="https://twitter.com/Prinzhorn" class="twitter-follow-button" data-show-count="false">Follow @Prinzhorn</a>
		<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
	</div>
-->

	<div id="scrollbar" data-0="top:0%;margin-top:2px;" data-end="top:100%;margin-top:-52px;"></div>
	<script type="text/javascript" src="dist/skrollr.min.js"></script>

	<!--[if lt IE 9]>
	<script type="text/javascript" src="dist/skrollr.ie.min.js"></script>
	<![endif]-->

	<script type="text/javascript">
	var s = skrollr.init({
		edgeStrategy: 'set',
		easing: {
			WTF: Math.random,
			inverted: function(p) {
				return 1-p;
			}
		}
	});
	</script>
            
          
!
            
              .stage {
  padding-top: 55%;
  position: relative;
  text-align: center;
}
@media screen and (min-width: 480px) {
  .stage {
    height: 262px;
    padding-top: 0;
  }
}
.stage div {
  position: absolute;
  width: 100%;
}
.stage p {
  margin: 0 auto;
  overflow: hidden;
  text-indent: -100em;
  width: 95%;
}

@-webkit-keyframes shaky {
  0%, 33% {
    background-position: 50% 0;
  }

  33.0001%, 66% {
    background-position: 50% 50%;
  }

  66.0001%, 100% {
    background-position: 50% 100%;
  }
}

@keyframes shaky {
  0%, 33% {
    background-position: 50% 0;
  }

  33.0001%, 66% {
    background-position: 50% 50%;
  }

  /* line 40, scss/shaky-animation.scss */
  66.0001%, 100% {
    background-position: 50% 100%;
  }
}



@keyframes scroll-container {
  0%, 33% {
    opacity: 1;
  }

  33.0001%, 100% {
    opacity: 0;
  }
}

/* line 71, scss/shaky-animation.scss */
.scroll {
  top: 8%;
  -webkit-animation: scroll-container 15s infinite;
  animation: scroll-container 15s infinite;
}

.scroll p {
  -webkit-animation: shaky 0.25s infinite;
  animation: shaky 0.25s infinite;
  background: transparent url('https://gups.co.uk/parallax-my-cartoon-face/shaky/images/scroll.svg') no-repeat 50% 0;
  background-size: 99%;
  max-width: 667px;
  padding-top: 28%;
}
@media screen and (min-width: 745px) {
.scroll {
	top: 28px;
	width: 667px;
	margin: auto;
	text-indent: -99999px;
	overflow: hidden;
	padding: 0 0 0 33.333333%;
}

  .scroll p {
    height: 232px;
    padding-top: 0;
  }
}
@media screen and (min-width: 320px) {
.scroll {
	top: 28px;
	width: 667px;
	margin: auto;
	text-indent: -99999px;
	overflow: hidden;
	padding: 0 0 0 10.333333%;
}
  .scroll p {
    height: 232px;
    padding-top: 0;
  }
}

/*
 * This file is NOT needed in order to use skrollr.
 * The demo uses it and it may help you as well.
 */


html, body {
	width:100%;
	height:100%;
	padding:0;
	margin:0;
	overflow-x:hidden;
}

.skrollable {
	/*
	 * First-level skrollables are positioned relative to window
	 */
	position:fixed;

	/*
	 * Skrollables by default have a z-index of 100 in order to make it easy to position elements in front/back without changing each skrollable
	 */
	z-index:100;
}

.skrollr-mobile .skrollable {
	/*
		May cause issues on Android default browser (see #331 on GitHub).
	*/
	position:absolute;
}

.skrollable .skrollable {
	/*
	 * Second-level skrollables are positioned relative their parent skrollable
	 */
	position:absolute;
}

.skrollable .skrollable .skrollable {
	/*
	 * Third-level (and below) skrollables are positioned static
	 */
	position:static;
}

html, body, div, span, p, a, del, em, img, ol, ul, li, fieldset, form, label {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}

html, body {
	line-height: 1;
	min-height:100%;
	font-family:Artial, Verdana, sans-serif;
}

body {
	background: #FFF;
	background-attachment:fixed;
}

ol, ul {
	list-style: none;
}

p {
	margin:1em 0;
	line-height:1.1em;
}

q {
	font-style:italic;
	color:#333;
}

h1 {
	font-size:2.91em;
	margin:0;
}

h1 > small {
	text-align:right;
	display:inline-block;
	font-size:.71em;
	text-indent:15em;
	color:#444;
}

h2 {
	color:inherit;
	font-size:1.91em;
	margin:2em 0 1em 0;
}

h2:first-child {margin-top:0;}

h3 {
	color:#333;
	font-size:1.41em;
	margin:1em 0;
}

h4 {
	color:#444;
	font-size:1.11em;
	margin:1em 0;
}

#progress {
	width:100%;
	background:#444;
	bottom:0;
	z-index:-1;
}

#scrollbar {
	position:fixed;
	right:2px;
	height:50px;
	width:6px;
	background:#444;
	background:rgba(0,0,0,0.6);
	border:1px solid rgba(255,255,255,0.6);
	z-index:300;
	border-radius:3px;
}

.skrollr-desktop #scrollbar {display:none;}

#bg1, #bg2, #bg3 {
	z-index:50;
	top:0;
	left:0;
	width:100%;
	height:100%;
	background:url(images/bubbles.png) repeat 0 0;
}

#bg2 {
	z-index:49;
	background-image:url(images/bubbles2.png);
}

#bg3 {
	z-index:48;
	background-image:url(images/bubbles3.png);
}

#intro {
	width:100%;
	text-align:center;
	border-radius:1em;
}

#intro .arrows {
	font-size:2em;
	color:#09f;
}

#transform {
	width:70%;
	left:50%;
	top:20%;
	margin-left:-35%;
	text-align:center;
	font-size:150%;

	.transform-origin(50%, 50%);
}

#properties {
	width:100%;
	height:100%;
	padding-top:10%;
	text-align:center;

	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

#easing_wrapper {
	width:100%;
	height:100%;
}

#easing {
	top:10%;
	width:50%;
	z-index:101;
}

.drop {
	background:#09f;
	font-weight:bold;
	padding:1em;
}

#download {
	width:80%;
	left:10%;
	height:80%;
	padding:3em;
	border:0 solid #222;

	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.twitter-share-button, .twitter-follow-button {
	vertical-align:middle;
}

	#FACE {position:relative; width:640px; margin:30px auto;}
	#topHead {padding: 0 0 0 160px;}
	#leftBrow {padding: 0 0 0 180px;}
	#rightBrow {padding: 0 0 0 355px;}
	#nose {padding: 0 0 0 270px;}
	#glasses {padding: 0 0 0 125px;}
	#righteyer {padding: 210px 0 0 400px;}
	#lefteyer {padding: 0 0 0 190px;}
	#leftear {padding: 0 0 0 510px;}
	#rightear {padding: 0 0 0 90px;}
	#rightsiggle {padding: 0 0 0 415px;}
	#leftsiggle {padding: 0 0 0 190px;}
	#tash {padding: 0 0 0 150px; position:relative; z-index:0;}
	#beard {padding: 0 0 0 105px;}
	
	@media only screen and (min-device-width : 768px) and (max-device-width : 1024px)  { 
		#tash {padding: 400px 0 0 150px;}
		#beard {padding:0px 0 0 105px;}
		#righteyer {padding: 225px 0 0 400px;}
		#lefteyer {padding: 10px 0 0 190px;}
	}
	@media only screen and (min-device-width : 320px) and (max-device-width : 568px) { 
		#tash {padding: 400px 0 0 150px;}
		#beard {padding:0px 0 0 105px;}
		#righteyer {padding: 225px 0 0 400px;}
		#lefteyer {padding: 10px 0 0 190px;}
		#FACE {margin:0;}

	}


            
          
!
            
              	var s = skrollr.init({
		edgeStrategy: 'set',
		easing: {
			WTF: Math.random,
			inverted: function(p) {
				return 1-p;
			}
		}
	});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console