Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                
<ol class="custom-bullet trophy">
  <li>one</li>
  <li>two</li>
  <li>three</li>
  <li>four</li>
  <li>five</br>(and a half)</li>
  <li>six</li>
</ol>

<ol class="custom-bullet medals">
  <li>one</li>
  <li>two</li>
  <li>three</li>
  <li>four</li>
  <li>five</br>(and a half)</li>
  <li>six</li>
</ol>

<ul class="custom-bullet flower">
  <li>one</li>
  <li>two</li>
  <li>three</li>
  <li>four</li>
  <li>five</br>(and a half)</li>
  <li>six</li>
</ul>

<ul class="custom-bullet heart">
  <li>one</li>
  <li>two</li>
  <li>three</li>
  <li>four</li>
  <li>five</br>(and a half)</li>
  <li>six</li>
</ul>
              
            
!

CSS

              
                body {
  font-size: xx-large; 
  padding:0.5em;
}

ul, ol{
  display:inline-block;
  vertical-align:top;
  border:solid 1px;
  padding:0.5em;
  padding-left:2em;
  margin:0.5em;
}

ul.custom-bullet, ol.custom-bullet{
  list-style:none;
}
ul.custom-bullet > li, ol.custom-bullet >li {
  clear:left;
}
ol.custom-bullet {
  counter-reset: liNum;
}
ol.custom-bullet > li {
  counter-increment:liNum 1;
}

ul.custom-bullet > li:before, ol.custom-bullet > li:before {
  content:"";
  height:1em;
  width:1em;
  display:block;
  float:left;
  margin-left:-1.5em;
  background-position:center;
  background-repeat:no-repeat;
  background-size:100%:
}
ol.custom-bullet > li:before{
  content:counter(liNum) ;
  text-align:center;
}
ul.heart > li:before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='-3 -1 16 16' preserveAspectRatio='xMidYMid meet'><path d='M5,12 C20,0 5,-2 5,3.5 C5,-2 -10,0 5,12 Z' fill='red' stroke='magenta' stroke-width='1'/></svg>");
  background-size:90%;
  background-position:center;
  transition: background-size 0.3s;
  -webkit-transition: background-size 0.3s;
}
ul.heart > li:hover:before{
  background-size:100%;
}
ul.flower > li:before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='90%' height='90%' viewBox='-1 -1 12 12' preserveAspectRatio='xMidYMid meet'><path d='M5,5 C5,7 4,8 6.5,11' stroke='green' fill='none' stroke-width='1'/><ellipse id='petal' cx='5' cy='2' ry='2.5' rx='1.5' fill='white' stroke='slateblue' stroke-width='0.5' /><use xlink:href='%23petal' transform='rotate(72 5 5)'/><use xlink:href='%23petal' transform='rotate(144 5 5)'/><use xlink:href='%23petal' transform='rotate(216 5 5)'/><use xlink:href='%23petal' transform='rotate(-72 5 5)'/><circle r='1' cx='5' cy='5' fill='goldenrod' stroke='yellow'/></svg>");
  background-position:center;
  background-size:95%;
  background-color:lightblue;
  border-radius:50%;
}
ul.flower > li:hover:before{
  background-color:pink;
}

ol.medals > li:nth-of-type(1):before{
  content:"";
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid meet'><circle cx='50' cy='50' r='45' fill='gold' stroke='goldenrod' stroke-width='5'/><text x='50' y='50' text-anchor='middle' style='font-family:Arial, Helvetica, sans-serif; font-size:24; stroke:brown; fill:goldenrod;  dominant-baseline: middle;' textLength='85' >GOLD</text></svg>");
}
ol.medals > li:nth-of-type(2):before{
  content:"";
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid meet'><circle cx='50' cy='50' r='45' fill='silver' stroke='SteelBlue' stroke-width='5'/><text x='50' y='50' text-anchor='middle' style='font-family:Arial, Helvetica, sans-serif; font-size:24; fill:SteelBlue; stroke:SlateGray;  dominant-baseline: middle;' textLength='85' >SILVER</text></svg>");
}
ol.medals > li:nth-of-type(3):before{
  content:"";
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid meet'><circle cx='50' cy='50' r='45' fill='goldenrod' stroke='chocolate' stroke-width='5'/><text x='50' y='50' text-anchor='middle' style='font-family:Arial, Helvetica, sans-serif; font-size:24; stroke:brown; fill:chocolate;  dominant-baseline: middle;' textLength='85' >BRONZE</text></svg>");
}
ol.medals > li:before{
  -webkit-transition: -webkit-transform 0.5s;
  transition: transform 0.5s;
}
ol.medals > li:hover:before{
  -webkit-transform:rotate(360deg);
  transform:rotate(360deg);
}

ol.trophy > li:before{
  content:"#" counter(liNum);
  font-size:75%;
  height:2em; width:2em; /* 1.5em in original font */
  margin-left:-2em;
  line-height:1.5em;
  color:goldenrod;
  text-shadow:brown -0.05em -0.05em;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid meet'><linearGradient id='shimmer'><stop offset='0%' stop-color='goldenrod'/><stop offset='70%' stop-color='gold'/><stop offset='100%' stop-color='goldenrod'/></linearGradient><path d='M10,5 Q50,0 90,5 C95,60 100,50 60,75 C70,85 85,90 88,92 Q50,105 12,92 C15,90 30,85 40,75 C0,50 5,60 10,5 Q50,10 90,5 ' fill='url(%23shimmer)' stroke='brown' stroke-width='2'/></svg>");
  background-size:95%;
}
ol.trophy > li:hover:before{
  -webkit-filter:drop-shadow(0 0 0.1em darkblue);
  filter:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' ><filter id='blurshadow'><feGaussianBlur in='SourceAlpha' stdDeviation='3' result='alphablur' /><feFlood flood-color='darkblue'/><feComposite in2='alphablur' operator='in'/><feMerge><feMergeNode/><feMergeNode in='SourceGraphic'/></feMerge></filter></svg>#blurshadow");
  filter:drop-shadow(0 0 0.1em darkblue);
}
              
            
!

JS

              
                
              
            
!
999px

Console