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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- size指定なし -->
<div>
  <h3>size指定なし(どれもdefault size)</h1>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane.svg" alt="" />
    <figcaption>
        AspectRatioなし
      </figcaption>
    </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_meet.svg" alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid meet
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_none.svg" alt="" />
    <figcaption>
      preserveAspectRatio=none
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMinYMin_meet.svg" alt="" />
    <figcaption>
      size指定なし preserveAspectRatio=xMinYMin_meet
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_slice.svg" alt=""/>
    <figcaption>
     preserveAspectRatio: xMinYMin slice
    </figcaption>
  </figure>
</div>

<!-- widthのみ -->
<div>
 <h3>width指定のみ(width1/2)(どれもwidth, height半分)</h3>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane.svg" width="113" alt="" />
    <figcaption>
      AspectRatioなし
    </figcaption>
   </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_meet.svg" width="113" alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid meet
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_none.svg" width="113" alt="" />
    <figcaption>
      preserveAspectRatio=none
    </figcaption>
   </figure>
  <figure>
     <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMinYMin_meet.svg" width="113" alt=""/>
    <figcaption>
      preserveAspectRatio=xMinYMin_meet
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_slice.svg" alt="" width="113"/>
    <figcaption>
     preserveAspectRatio: xMidYMid slice
    </figcaption>
  </figure>
</div>

<!-- heightのみ -->
<div>
  <h3>height指定のみ(height*2)(width指定のみ同様)</h3>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane.svg" height="450" alt="" />
  <figcaption>
    AspectRatioなし
  </figcaption>
</figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_meet.svg" height="450"  alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid meet
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_none.svg" height="450" alt="" />
    <figcaption>
     preserveAspectRatio=none
    </figcaption>
  </figure>
  <figure>
     <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMinYMin_meet.svg" height="450" alt=""/>
    <figcaption>
      preserveAspectRatio=xMinYMin_meet
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_slice.svg" alt="" height="450"/>
    <figcaption>
     preserveAspectRatio: xMidYMid slice
    </figcaption>
  </figure>
</div>

<!-- width1/2 height 1/2 -->
<div>
  <h3>widthを両方指定(同じスケールwidth, height1/2)</h3>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane.svg" width="113" height="113" alt="" />
    <figcaption>
     AspectRatioなし
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_meet.svg" width="113" height="113"  alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid meet
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_none.svg" width="113" height="113" alt="" />
    <figcaption>
     preserveAspectRatio=none
    </figcaption>
  </figure>
  <figure>
     <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMinYMin_meet.svg" width="113" height="113" alt=""/>
    <figcaption>
      preserveAspectRatio=xMinYMin_meet
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_slice.svg" alt="" width="113" height="113"/>
    <figcaption>
     preserveAspectRatio: xMinYMin slice
    </figcaption>
  </figure>
</div>

<!-- width: 1/2 &lt; height *1 -->
<div>
  <h3>width: 1/2 &lt; height *1</h3>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane.svg" width="113" height="225"  alt="" />
  <figcaption>
   AspectRatioなし
  </figcaption>
</figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_meet.svg" width="113" height="225"  alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid meet
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_none.svg" width="113" height="225" alt="" />
    <figcaption>
     preserveAspectRatio=none
    </figcaption>
  </figure>
  <figure>
     <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMinYMin_meet.svg" width="113" height="225" alt=""/>
    <figcaption>
      preserveAspectRatio=xMinYMin_meet
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_slice.svg" alt="" width="113" height="225"/>
    <figcaption>
     preserveAspectRatio: xMidYMid slice
    </figcaption>
  </figure>
</div>

<!-- width 1 &gt; height 1/2 -->
<div>
  <h3>width 1 &gt; height 1/2</h3>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane.svg" width="225" height="113"  alt="" />
    <figcaption>
     AspectRatioなし
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_meet.svg" width="225" height="113"  alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid meet
    </figcaption>
  </figure>
  <figure>
    <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_none.svg" width="225" height="113"  alt="" />
    <figcaption>
     preserveAspectRatio=none
    </figcaption>
  </figure>
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMinYMin_meet.svg" width="225" height="113"  alt=""/>
    <figcaption>
     preserveAspectRatio: xMinYMin meet
    </figcaption>
  </figure>  
  <figure>
   <img src="https://dl.dropboxusercontent.com/u/49792001/html/svg/nico_shape_inkscape_plane_preserveAspectRatio_xMidYMid_slice.svg" width="225" height="113"  alt=""/>
    <figcaption>
     preserveAspectRatio: xMidYMid slice
    </figcaption>
  </figure>
</div>


              
            
!

CSS

              
                figure{
  display: inline-block;
}

figure > img {
  border: 1px #333 solid;
}

              
            
!

JS

              
                
              
            
!
999px

Console