Pen Settings



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


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


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.


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.


                <div class="bg">
  <p>Background Image test</p>
  <span>High contrast text test</span>

<div class="fbg">
  <img src="" alt="">
  <p>Faked Background Image test</p>


                body {
  margin: 0;
  display: flex;
  overflow: hidden; 
  /* don't try this at home kids */

div {
  flex: 1 0 0;
  position: relative;
  min-width: 50%; /* ie11 */

.bg {
  background: url( no-repeat;
  background-size: cover;
  min-height: 100vh;
  border: 1px solid;

.fbg img {
  position: absolute;
  object-fit: cover;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;

.fbg p,
.bg p {
  background: #000;
  padding: .625em;
  color: #fff;
  display: inline-block;
  margin: 2em;
  position: relative;

/* this text will appear in high contrast mode */
span {
  color: transparent;


  Testing background images in Windows
  high contrast mode (HCM):
  Does NOT display background image in HCM:
  * IE11 
  * Firefox 65 
  DOES display background image in HCM:
  * Edge
  Presently doesn't support HCM:
  * Safari
  * Chrome