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

              
                <h1>正方形</h1>
<svg viewBox="0 0 800 200">
    <rect class="rect1" fill="blue" />
</svg>

<h1>角丸長方形</h1>
<svg viewBox="0 0 800 200">
    <rect class="rect2"/>
</svg>

<h1>線あり(塗りを上に)</h1>
<svg viewBox="0 0 800 200">
    <rect class="rect3">
</svg>
  
<h1>円</h1>
<svg viewBox="0 0 800 200">
    <circle class="circle1">
</svg>

<h1>直線(座標はCSS指定できない)</h1>
<svg viewBox="0 0 800 200">
  <line class="line1" x1="50" y1="50" x2="400" y2="150">
</svg>

<h1>多角形(座標はCSS指定できない)</h1>
<svg viewBox="0 0 1000 400">
  <polygon class="polygon1" points="0 200 250 50 220 350 600 150">
</svg>
              
            
!

CSS

              
                svg{
  background: #f5f5f5;
}
h1{
  font-size: 16px;
}
.rect1{
  x: 20;
  y: 20;
  width: 100px;
  height: 100px;
  fill: #F44D61;
}
.rect2{
  x: 20;
  y: 20;
  width: 200px;
  height: 100px;
  rx: 10;
  fill: #6890E0;
}
.rect3{
  x: 20;
  y: 20;
  width: 200px;
  height: 100px;
  fill: #B1D561;
  stroke: #3A6840;
  stroke-width: 8;
  paint-order: stroke;
}
.circle1{
  cx: 80;
  cy: 80;
  r: 50;
  fill: #F4AC56;
}
.line1{
  stroke: #a361b3;
  stroke-width: 8;
}
.polygon1{
  fill: #FFA4B3;
  stroke: #F44D61;
  stroke-width: 4;
}
              
            
!

JS

              
                
              
            
!
999px

Console