cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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>
  <picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
    <source srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/runner-wide.jpg" media="(min-width: 1200px)">
    <source srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/runner-narrow_copy.jpg" media="(min-width: 800px)">
<!--[if IE 9]></video><![endif]-->
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/male-runner-square.jpg" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/male-runner-square.jpg" alt="Photograph of a man running along a pier during sunset, with a harbour in the background">
</picture>
<figcaption>Resize the browser to see the different responsive art-directed images</figcaption>
</figure>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ligula mi, posuere id ultrices in, fringilla vehicula risus. Maecenas suscipit augue ac sapien commodo bibendum. Phasellus ligula mi, posuere id ultrices in, fringilla vehicula Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ligula mi, posuere id ultrices in, fringilla vehicula risus. Maecenas suscipit augue ac sapien commodo bibendum. Phasellus ligula mi, posuere id ultrices in, fringilla vehicula

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ligula mi, posuere id ultrices in, fringilla vehicula risus. Maecenas suscipit augue ac sapien commodo bibendum. Phasellus ligula mi, posuere id ultrices in, fringilla vehicula.
            
          
!
            
              body { 
  font-family: Avenir, Calibri, sans-serif; 
  margin: 0 6rem; 
  background: #111; 
  color: #fff; 
}
picture source, picture img { 
  width: 100%; height: auto; 
}
p { 
  width: 80%; 
  margin: 2rem auto; }
figcaption { text-align: center; }
@media all and (max-width: 500px) { p { width: 100%; } }
            
          
!
            
              // picturefill polyfill for non-supporting browsers
            
          
!
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