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

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

              
                <div id="blurryscroll" aria-hidden="true"></div>
<nav>
  <a href="#">Tours</a>
  <a href="#">Popular Destinations</a>
  <a href="#">History</a>
</nav>
<main id="content">
  <h1>London</h1>
  <div>
    <p>With roots at least 7,000 years old, London is an accretion of artifacts old and new, from the remnants of wooden Neolithic settlements buried in the mud of the Thames to gleaming 21st century spires of glass and steel.
    <p>The city is so old that the origins of its very name are unknown: it's first recorded title, <em>Londinium</em>, was provided by the Romans in the first years of the Common Era, but the etymology of the word is completely obscure.
    <p>This extends to some of its architecture: the <em>London Stone</em>, an irregular block of limestone at 111 Cannon Street, has been guarded by an iron grill for centuries, but no-one has known what the stone's purpose is, or why it is there, for the past 1000 years.
  </div>
</main>
              
            
!

CSS

              
                * { box-sizing: border-box; }
body { 
  font-family: Gill Sans;
  margin: 0;
  background: #333;
}
#blurryscroll { 
	top: 0; left: 0; 
  width: 100%;
	height: 5rem;
	overflow: hidden;
	position: fixed;
	filter: blur(4px); 
}
nav { 
	@extend #blurryscroll;
	filter: none; 
  text-align: right;
  
  a { 
    display: inline-block;
    padding: 1rem;
    text-decoration: none;
    color: #000;
    font-size: 1.2rem;
  }
}
main {
  margin: 0;
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/london_copy.jpg);
  background-size: cover;
  padding: 2rem;
  min-height: 100vh;
  div { 
    margin-top: -6rem;
    width: 40%; 
    margin-left: 30%;
    line-height: 1.3;
    background: rgba(255,255,255,0.75);
    padding: 2rem; 
  }
  h1 { 
    font-weight: 100;
    font-size: 4rem;
  }
  p { font-size: 1.2rem; }
}
@media all and (max-width: 500px) { 
  main div {
    width: 85%;
    margin:  0 auto;
  }
}
              
            
!

JS

              
                var pageContent = document.getElementById("content"),
	pagecopy = pageContent.cloneNode(true),
	blurryContent = document.getElementById("blurryscroll");
	blurryContent.appendChild(pagecopy);
	window.onscroll = function() { blurryContent.scrollTop = window.pageYOffset; }
              
            
!
999px

Console