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

              
                 <svg xmlns="http://www.w3.org/2000/svg" version="1.1"  viewPort="0 0 500 300">
  <filter id="blur" x="-50%" y="-50%" width="200%" height="200%">
  <feGaussianBlur id="test" in="SourceGraphic" stdDeviation="0 0" />
  </filter>
	 <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="black" filter="url(#blur)" />
</svg>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit quidem fugiat debitis necessitatibus perspiciatis quae libero sint, suscipit eveniet eaque placeat similique est sit, maxime amet ab voluptates nemo modi.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus fuga reiciendis, repudiandae qui, debitis sunt dolores, rerum aliquid labore, corporis cumque! Magni laborum atque nemo, esse, ducimus tempore dolor aut.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus fuga reiciendis, repudiandae qui, debitis sunt dolores, rerum aliquid labore, corporis cumque! Magni laborum atque nemo, esse, ducimus tempore dolor aut.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit quidem fugiat debitis necessitatibus perspiciatis quae libero sint, suscipit eveniet eaque placeat similique est sit, maxime amet ab voluptates nemo modi.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus fuga reiciendis, repudiandae qui, debitis sunt dolores, rerum aliquid labore, corporis cumque! Magni laborum atque nemo, esse, ducimus tempore dolor aut.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus fuga reiciendis, repudiandae qui, debitis sunt dolores, rerum aliquid labore, corporis cumque! Magni laborum atque nemo, esse, ducimus tempore dolor aut.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit quidem fugiat debitis necessitatibus perspiciatis quae libero sint, suscipit eveniet eaque placeat similique est sit, maxime amet ab voluptates nemo modi.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus fuga reiciendis, repudiandae qui, debitis sunt dolores, rerum aliquid labore, corporis cumque! Magni laborum atque nemo, esse, ducimus tempore dolor aut.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus fuga reiciendis, repudiandae qui, debitis sunt dolores, rerum aliquid labore, corporis cumque! Magni laborum atque nemo, esse, ducimus tempore dolor aut.</p>
              
            
!

CSS

              
                body {
	height: 500vh;
	background: black;
}

p {
	width: 50%;
	margin: 0 auto 50px auto;
	font-size: 35px;
	font-weight: bold;
	color: white;
	filter: url("#blur");
}

              
            
!

JS

              
                // // extension:
// $.fn.scrollEnd = function(callback, timeout) {          
//   $(this).scroll(function(){
//     var $this = $(this);
//     if ($this.data('scrollTimeout')) {
//       clearTimeout($this.data('scrollTimeout'));
//     }
//     $this.data('scrollTimeout', setTimeout(callback,timeout));
//   });
// };

// $(window).on('scroll', function(){
// 	$('body').addClass('scroll');

// 	TweenMax.to("#test", 2, {attr:{stdDeviation:"0 20"}});

// });
// // how to call it (with a 50ms timeout):
// $(window).scrollEnd(function(){

// 	TweenMax.to("#test", .1, {attr:{stdDeviation:"0 0"}});
	
// }, 10);

let currentPixel = window.pageYOffset;

const looper = function(){
	const newPixel = window.pageYOffset;
	const diff = newPixel - currentPixel;
	const speed = diff * .1;
	
	const blur = speed < 0 ? speed * -1 : speed;
	
	//console.log(speed);
	
	//TweenMax.to($('.item-content'), .5, {skewY: speed + 'deg'});
	TweenMax.to("#test", 0, {attr:{stdDeviation:"0 " + blur * 3}});
	//TweenMax.to("#test", 0, {attr:{stdDeviation:"0 " + blur * 2}});
	
	currentPixel = newPixel;
	
	requestAnimationFrame(looper);
}

looper()


              
            
!
999px

Console