Pen Settings

HTML

CSS

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

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 class="img">
  <div class='mask'></div>
</div>
              
            
!

CSS

              
                div
  width 700px
  height @width
  background url("https://drscdn.500px.org/photo/111353513/q%3D80_m%3D2000/v2?sig=661525c8589f3195324f8dddbf42a700bba7f6aafe9c7c2cb8d73c870102e1e2") center/cover
  position absolute
  overflow hidden
  &.mask
    background-image none
    filter drop-shadow(3px 3px 5px black)
    z-index 100
    &:after
      content ''
      width 100%
      height 100%
      background @background
      display block
      filter blur(4px) 
      clip-path polygon(0% 0%, 0% 100%, 25% 100%, 25% 25%, 75% 25%, 75% 75%, 25% 75%, 25% 100%, 100% 100%, 100% 0%)
      
// 背景色
body
  width 100vw
  height 100vh
  background #1d1e22
  display flex
  justify-content center
  align-items center
              
            
!

JS

              
                
              
            
!
999px

Console