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="container">
  <p class="intro">
    The initial value set on the <code>background-size</code> property is <code>auto</code>, which is the default value.
  </p>
  <div class="element element-1">My background origin has the default padding-box value. The background's position origin is at the padding box's top left corner.
</div>
  <div class="controls">
    
    <label for="radio-1">
      <input checked type="radio" id="radio-1" name="bsize" onchange="if(this.checked) document.querySelector('.element-1').style.backgroundOrigin='padding-box';" />
      <span>Padding Box</span>
    </label>
    
    <label for="radio-2">
      <input type="radio" id="radio-2" name="bsize" onchange="if(this.checked) document.querySelector('.element-1').style.backgroundOrigin='border-box';" />
      <span>Border Box</span>
    </label>
    
    <label for="radio-3">
      <input type="radio" id="radio-3" name="bsize" onchange="if(this.checked) document.querySelector('.element-1').style.backgroundOrigin='content-box';" />
      <span>Content Box</span>
    </label>
    
  </div>
  <p class="credits">Image from <a href="http://unsplash.com">Unsplash</a></p>
</div>
              
            
!

CSS

              
                * { 
    box-sizing: border-box; 
    -moz-box-sizing: border-box; 
}

body {
    background-color: #F5F5F5;
    color: #555;
    font-size: 1.1em;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.intro{
  font-size: 14px;
}

code{
  color: green;
  background: #e1e1e1;
  padding: 2px 5px;
  display: inline-block;
  border-radius: 3px;
}

.container {
    padding: 20px;
}

.controls {
    padding: 20px 0;
}

.controls label {
    font-weight: bold;
    display: inline-block;
    margin-right: 10px;
  margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    font-size: 75%;
    background: #a5ad1f;
    padding: 5px 10px 5px 5px;
    cursor: pointer;
  border-radius: 3px;
}

.controls label input {
    vertical-align: top;
}

.controls label span {
    vertical-align: middle;
}

.element {
  padding: 40px;
  margin-bottom: 30px;
  background-color: #0099cc;
  color: white;
  border: 30px solid rgba(233, 19, 140, 0.5);
  background-image: url(https://jannah.tielabs.com/demo/wp-content/uploads/sites/8/2016/05/6859113-sports-wallpaper-1024x576.jpg);
  height: 300px;
  background-repeat: no-repeat;
}

.credits{
  font-size: 12px;
  color: #999;
}

.credits a{
  color: black;
  text-decoration: none;
}








.testbg{
  width: 100%;
  height: 500px;
  padding: 30px;
  border: 30px solid rgba(red, 0.3);
  background:  url(https://jannah.tielabs.com/demo/wp-content/uploads/sites/8/2016/05/6859113-sports-wallpaper-1024x576.jpg) no-repeat 30% 10% / 100px 100px, 
    url(https://jannah.tielabs.com/demo/wp-content/uploads/sites/8/2016/05/6859113-sports-wallpaper-1024x576.jpg) no-repeat 50% 50% / 100px 100px padding-box padding-box red;
}
              
            
!

JS

              
                
              
            
!
999px

Console