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="description">
  <p>Blue item is animating transform property, which can antialias so it can render in-between pixels.</p>
  <p>Red item is animating margin, which like all layout properties cannot render a fraction of a pixel, so it has to round.</p>
  This example is scaled up 20x.
</div>
<input type="checkbox" id="animate">
<label for="animate">Play animation</label>
<div class="transform-example-wrapper">
  <div class="transform-item transition-4"></div>
  <div class="transform-item transition-5"></div>
</div>
              
            
!

CSS

              
                body {
  font-size: 1.25em;
  padding: 40px 40px 500px  ;
}

label {
  display: inline-block;
  margin: 0 0 40px;
}

.description {
  line-height: 1.75em;
  padding: 1.5em 0;
}

.transform-example-wrapper {
  position: relative;
  border: 1px solid #d4d4d4;
  padding: 0.5em;
  color: #999;
  font-size: 0.1rem;
  transform: scale(30);
  width: 8px;
  transform-origin: top left;
}

.transform-example-wrapper > .transform-item {
    position: relative;
    box-sizing: border-box;
    z-index: 1;
    width: 5px;
    height: 5px;
    margin: 0 0.5em 0 0;
    float: left;
    border: 1px solid rgba(35, 165, 216, 1);
    background: rgba(35, 165, 216, 0.3);
  
  &:first-child {
    transition: transform 3s linear;
    float: none;
    margin-bottom: 0.25em;
  }
  
  &:last-child {
    transition: margin 3s linear;
    float: none;
    margin-bottom: 0.25em;
    border-color: rgba(200, 0, 0, 0.9);
    background: rgba(200, 0, 0, 0.3);
  }
}

:checked ~ .transform-example-wrapper .transition-4 {
    transform: translate(2em);
}

:checked ~ .transform-example-wrapper .transition-5 {
    margin-left: 2em;
}

              
            
!

JS

              
                
              
            
!
999px

Console