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 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.

              <h1>IE7+ Fallback Inline SVG icons using background images </h1>
<div class="svg-defs">
  <symbol id="svg-ok" viewBox="-20 -20 40 40">
    <title>SVG OK</title>
    <circle fill="limegreen" r="19" />
    <path stroke="forestgreen" fill="none" stroke-width="6"
          d="M-12,3 L-3,10 11,-12" />
    <text dy="0.35em" text-anchor="middle" font-weight="bold"
          font-size="18px" font-family="sans-serif"
<p>Somewhere in the text...
<svg class="icon">
  <a class="svg-status"></a>
  <use xlink:href="#svg-ok" />
...there is an icon</p>
              .svg-defs {
  position: absolute;
  height: 0; width: 0;
  overflow: hidden;
svg.icon {
  display: inline-block;
  height: 2em;
  width: 2em;
p {
  font-size: 125%;

/* fallback styles */
.icon a, 
.icon + a { 
  /* The first selector is for Android, the second for IE.
     The sibling selector is because old IE won't treat
     an unrecognized element as a container.
  display: inline;
  display: inline-block;
  min-height: 24px;
  min-width: 24px;
  background-position: center;
  background-color: #AAF;  
    /* color is not required, it is included 
       so you can see the size of the element
       if the image does not load */
.icon .svg-status,
.icon + .svg-status{
  background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/91525/svg-no-24x24.png');

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.


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