cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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.

            
              <svg display="none" version="1.1" viewBox="0 0 32 32">
	<defs>
		<g id="icon-close">
			<path class="path1" d="M31.708 25.707v0l-9.708-9.708 9.708-9.708c0.104-0.104 0.18-0.227 0.229-0.356 0.134-0.355 0.058-0.771-0.229-1.058l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.131 0.049-0.254 0.125-0.357 0.229l-9.708 9.708-9.708-9.708c-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057 0.229l-4.586 4.585c-0.286 0.286-0.361 0.702-0.231 1.058 0.051 0.13 0.125 0.252 0.23 0.356l9.709 9.708-9.708 9.708c-0.105 0.104-0.18 0.228-0.23 0.357-0.132 0.354-0.056 0.771 0.23 1.057l4.586 4.586c0.286 0.286 0.702 0.361 1.057 0.229 0.131-0.050 0.252-0.125 0.357-0.229l9.708-9.708 9.708 9.708c0.104 0.104 0.227 0.18 0.357 0.229 0.355 0.133 0.771 0.057 1.057-0.229l4.586-4.586c0.286-0.286 0.362-0.702 0.229-1.057-0.049-0.129-0.126-0.253-0.229-0.357z"></path>
		</g>
	</defs>
</svg>

<h1>Inline SVG w/PNG Fallback<br><code>&lt;use&gt;</code> <code>&lt;image&gt;</code> pattern.</h1>
<p>IE8 shows <code>&lt;svg&gt;</code> <code>&lt;desc&gt;</code> content?</p>


<svg class="icon icon-close" viewBox="0 0 32 32" aria-labelledby="title description">
  <title id="title">Close</title>
  <desc id="description">A button to close the super cool tool.</desc>
  <use xlink:href="#icon-close"></use>
  <image src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/15309/sprites.png" width="32" height="32">
</svg>
  
  
<h2>Using Conditional</h1>
  <p>This conditional hides the description from IE 5-9 but includes all other browsers.</p>
<p><code>&lt;!--[if !IE]> --&gt;</code> <code>&lt;desc&gt;...&lt;/desc&gt;</code> <code>&lt;!-- &lt;![endif]--&gt;</code></p>


<svg class="icon icon-close" viewBox="0 0 32 32" aria-labelledby="title description">
  <title id="title">Close</title>
  <!--[if !IE]> -->
  <desc id="description">A button to close the super cool tool.</desc>
  <!-- <![endif]-->
  <use xlink:href="#icon-close"></use>
  <image src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/15309/sprites.png" width="32" height="32">
</svg>
  
  
            
          
!
            
              body {
  max-width: 40em;
  margin: 3em auto;
  text-align: center;
}

.icon { width: 32px; }

p { 
  line-height: 1.8em; 
  code {
    background: #eee;
    border-radius: 1em;
  }
}

            
          
!
999px
Loading ..................

Console