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

              
                <section style="min-height:50vh; background-color:black; color:white">

<div class="draft">
  This is some content that is a draft.
</div>

<div>
  This content on the other hand is definitely not a draft.
  <br>Definitely important.
</div>

<div class="draft">
  <p>I just threw in this image to see what it would look like.</p>
  <img src="https://picsum.photos/200">
</div>
</section>
  
<section style="height:6em; background-color:white; color:black">
  <div class="draft">
    <p>This isn't very official either</p>
  </div>
</section>
              
            
!

CSS

              
                .draft{
  position:relative;
}


.draft:before{
  content: '';
  display: block;
  position: absolute;
  font-family:sans-serif;
  color:yellow;
  width:calc(100% - 1px);
  height:calc(100% - 1px);
  outline: dashed 1px grey;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 34'><text style='font-family:ComicSansMS, Comic Sans MS; font-size:12pt;' y='15'>Draft</text><text style='font-family:ComicSansMS, Comic Sans MS; font-size:12pt; fill:white' y='32'>Draft</text></svg>");
  background-size: auto 1.5em;
  opacity:0.33;
  animation: crawl 12s steps(15) infinite;
  overflow:hidden;
  text-overflow:hidden;
}

@keyframes crawl{
  0% { background-position: 0 0}
  20%, 60% { opacity:0; display:none; }
  100% { background-position: 2.2em -6em }
}

body{
  font-size:22px;
  font-family:Helvetica;
  margin:0;
}

*{
  box-sizing:border-box;
}

section{
  padding:10px;
}
              
            
!

JS

              
                
              
            
!
999px

Console