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='popup'></div>
              
            
!

CSS

              
                .popup {
  // center position with fixed size  
  position: absolute;
  inset: 0;
  width: 450px;
  height: 220px;
  margin: auto;
  
  // center content within the popup
  display: grid;
  place-items: center;
  align-content: center;
  
  // visual appearance
  background: white;
  
  // The blur-fade effect
  &::before {    
    content: '';
    position: absolute;
    
    // should not affect the contents of the container
    z-index:-1;
    
    // blur size should be anything below `0`
    // so it will extend to the outside 
    inset: -100px;
    
    // the backdrop blur 
    -webkit-backdrop-filter: blur(10px);  // for safari
    backdrop-filter: blur(10px);
    
    // a mask fades the blur effect so it gets weaker
    // towards the edges, further from the container box.
    // (fill color is irrelevant, so "red" is used as it's the shortest color name)
    mask: 
      linear-gradient(to top, transparent 0%, red 100px calc(100% - 100px), transparent 100%), 
      linear-gradient(to left, transparent 0%, red 100px calc(100% - 100px), transparent 100%);
    -webkit-mask: 
      linear-gradient(to top, transparent 0%, red 100px calc(100% - 100px), transparent 100%), 
      linear-gradient(to left, transparent 0%, red 100px calc(100% - 100px), transparent 100%);
    
    // merges the above multiple gradients (mask) so only the pixels which
    // overlap both are rendered, and this creates the illusion of a fade-out mask
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
  }
}

////////////////////////////////
// demo things

body {
  height: 100vh;
  overflow: hidden;
  background: url('https://vistapointe.net/images/hieroglyphs-1.jpg') center / 20%;
}
              
            
!

JS

              
                
              
            
!
999px

Console