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

              
                <!-- Learn about backdrop-filter on CSS-Tricks: https://css-tricks.com/almanac/properties/b/backdrop-filter/ -->

<div class="container">
  <div class="no-support">
    <p>Heads up: It doesn't look like your browser supports <code>backdrop-filter</code>! Check <a href="https://caniuse.com/#feat=css-backdrop-filter">Can I use</a> for current browser support. Maybe try opening this CodePen in a different browser that supports <code>backdrop-filter</code>?</p>
  </div>
  <div class="boxes">
    <p>Scroll → </p>
    <div class="box none">
      <h1>backdrop-filter: none</h1>
    </div>
    <div class="box grayscale">
      <h1>backdrop-filter: grayscale(1)</h1>
    </div>
    <div class="box brightness">
      <h1>backdrop-filter: brightness(1.5)</h1>
    </div>
    <div class="box blur">
      <h1>backdrop-filter: blur(5px)</h1>
    </div>
    <div class="box contrast">
      <h1>backdrop-filter: contrast(.8)</h1>
    </div>
    <div class="box invert">
      <h1>backdrop-filter: invert(.7)</h1>
    </div>
    <div class="box opacity">
      <h1>backdrop-filter: opacity(.4)</h1>
    </div>
    <div class="box sepia">
      <h1>backdrop-filter: sepia(.4)</h1>
    </div>
    <div class="box saturate">
      <h1>backdrop-filter: saturate(1.8)</h1>
    </div>
    <div class="box hue-rotate">
      <h1>backdrop-filter: hue-rotate(120deg)</h1>
    </div>
  </div>
</div>

              
            
!

CSS

              
                

.no-support {
  text-align: center;
  padding: 10px;
  width: 300px;
  position: absolute;
  z-index: 100;
  top: 5px;
  left: 5px;
  background: #ee6620;
  color: #fff;
  font-size: 12px;
}

@supports(backdrop-filter: opacity( 1.0 )) {
  .no-support {
    display: none;
  }
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  margin: 0;
}

body {
  background-color: black;
  display: flex;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.container {
  background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/14179/0236.jpg');
  background-size: cover;
  height: 100vh;
  padding: 10px;
  width: 100%;
  position: relative;
  iframe {
    position: absolute;
    top:0; right: 0; left: 0; bottom:0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.boxes {
  display: flex;
  margin-right: 10px;
  overflow: scroll;
  min-height: 90vh;
  width: 100%;
  align-items: center;
  
  p {
    display: block;
    font-weight: 600;
    min-width: 200px;
    color: white;
    font-size: 40px;
    @media (min-width:767px) {
      font-size: 60px;
      min-width: 300px;
    }
  }
}

.box {
  border: 1px solid rgba(255,255,255,.7);
  min-width: 400px;
  min-height: 95vh;
  line-height: 1; 
  padding: 15px 15px;
  transition: all .3s ease;
  
  &:nth-child(1n + 1) {
    border-right: none;
  }
  
  h1 {
    font-weight: 400;
    font-size: 18px;
  }
}

.none {
  backdrop-filter: none;
}

.grayscale {
  backdrop-filter: grayscale(1);  
}
.brightness {
  backdrop-filter: brightness(1.5);  
}
.blur {
  backdrop-filter: blur(5px);  
}
.contrast {
  backdrop-filter: contrast(.8);  
}
.drop-shadow {
  backdrop-filter: drop-shadow(4px 4px 10px blue);  
}
.invert {
  backdrop-filter: invert(.7);
}
.opacity {
  backdrop-filter: opacity(.4);
}
.sepia {
  backdrop-filter: sepia(.4);
}
.saturate {
  backdrop-filter: saturate(1.8);
}
.hue-rotate {
  backdrop-filter: hue-rotate(120deg);
}
              
            
!

JS

              
                
              
            
!
999px

Console