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></div>
              
            
!

CSS

              
                body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

div {
  width: 50vw;
  height: 50vh;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.6);
  padding: 1vw;
  background-color: #9CB3E3;
  background-image: 
    // top line
    linear-gradient(to right, rgba(0, 0, 0, 0.8) 60%, transparent 60%, transparent 100%), 
    linear-gradient(to right, rgba(255, 255, 255, 0.5) 60%, transparent 60%, transparent 100%),  
    
    // right line
    
    linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 60%, transparent 60%, transparent 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 60%, transparent 60%, transparent 100%), 
    
    // bottom line
    linear-gradient(to right, rgba(0, 0, 0, 0.8) 60%, transparent 60%, transparent 100%), 
    linear-gradient(to right, rgba(255, 255, 255, 0.5) 60%, transparent 60%, transparent 100%),
    
    // left line
    linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 60%, transparent 60%, transparent 100%), 
    linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 60%, transparent 60%, transparent 100%),
    
    linear-gradient(to right, #9CB3E3, #9CB3E3);
  background-repeat: 
    repeat-x, repeat-x,  // top line
    repeat-y, repeat-y,  // right line
    repeat-x, repeat-x,  // bottom line
    repeat-y, repeat-y,  // left line
    repeat;
  background-size: 
    40px 1px,40px 1px, // top line
    1px 40px,1px 40px, // right line
    40px 1px,40px 1px, // bottom line
    1px 40px,1px 40px, // left line
    cover;
  background-position: 
    2vw 2vw, 2vw calc(2vw + 1px), // top line
    calc(100% - 2vw) 1vw, calc(100% - 2vw - 1px) 1vw, // right line
    2vw calc(100% - 2vw), 2vw calc(100% - 2vw + 1px), // top line
    3vw 1vw, calc(3vw - 1px) 1vw, // right line
    0 0;
  background-clip: 
    content-box, content-box,  // top line
    content-box, content-box,  // right line
    content-box, content-box,  // bottom line
    content-box, content-box,  // left line
    border-box;
}
              
            
!

JS

              
                
              
            
!
999px

Console