cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <figure>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/kirkjufell.jpg" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/kirkjufell.jpg 1x, https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/kirkjufell@2x.jpg 2x" alt="Photograph of a blurred waterfall in Iceland with a conical mountain behind it">
  <figcaption>Example of <code>Nx srcset</code> syntax: 196DPI+ screens will recieve the 2x image, regardless of display size; all others will recieve 1x version</figcaption>
</figure>

<figure class="retina">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/skogafoss.jpg" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/skogafoss.jpg 1000w, https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/skogafoss@2x.jpg 2000w" alt="Photograph of a tiny human figure in a red rainjacket drawfed by the scale of the Skógafoss waterfall in Iceland">
  <figcaption>Example of of <code>Nw srcset</code> syntax: viewports more than 2000 <em>device</em> pixels wide will recieve the 2x version; those under 1000 will recieve 1x.</figcaption>
</figure>
            
          
!
            
              body { 
  background: #223; color: #fff; 
  font-family: Avenir, sans-serif;
}
figure { 
  width: 60%; margin: 0 auto;
  margin-bottom: 2rem; 
}
figure img { 
  width: 100%; 
  height: auto; 
  margin-bottom: 1rem;
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console