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

              
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   id="svg1201"
   version="1.1"
   viewBox="0 0 183.64829 149.57344"
   height="149.57344mm"
   width="183.64828mm"
   role="img"
   focusable="false"
 >
  <title>Geometric, red and yellow glyph that resembles the letters BM</title>
  <defs
     id="defs1195" />
  <metadata
     id="metadata1198">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     transform="translate(-384.42586,49.840295)"
     id="layer1">
    <g
       transform="rotate(-15,-113.56453,-978.40061)"
       id="g1183-8"
       style="fill:#220b28">
      <path
         d="M 185.09253,100.02508 163.87935,78.811898 142.66617,57.598732 121.453,78.811898 l 21.21317,21.213182 -21.21317,21.21317 21.21317,21.21318 -21.21317,21.21317 21.21317,21.21318 21.21318,-21.21318 21.21318,-21.21317 -21.21318,-21.21318 z"
         id="left-shadow" />
      <path
         d="m 193.36149,150.68208 -21.21317,21.21318 -21.21318,21.21369 21.21318,21.21317 21.21317,-21.21317 21.21318,21.21317 21.21317,-21.21317 21.2137,21.21317 21.21317,-21.21317 -21.21317,-21.21369 -21.2137,-21.21318 -21.21317,21.21318 z"
         id="right-shadow" />
    </g>
    <path
       d="m 451.3873,-19.840334 -25.98073,-14.999981 -25.98074,-14.99998 -14.99997,25.98072 25.98072,14.9999947 -14.99997,25.9807203 25.98072,14.999991 -14.99998,25.980724 25.98073,14.99998 14.99998,-25.980734 14.99999,-25.98072 -25.98074,-14.9999914 z"
       id="b" />
    <path
       d="m 472.4855,26.950411 -14.99998,25.980734 -14.99985,25.98123 25.98073,14.99997 14.99998,-25.98072 25.98073,14.99997 14.99998,-25.98072 25.98124,14.99984 L 565.42831,45.969992 539.44744,30.969511 513.4662,15.96966 498.46623,41.950392 Z"
       id="m" />
  </g>
</svg>

              
            
!

CSS

              
                body {
  background-color: whitesmoke;
}

#left-shadow {
  opacity:1;
  fill:#220b28;
  fill-opacity:1;
  stroke:none;
  stroke-width:0.534506;
  stroke-miterlimit:4;
  stroke-dasharray:none;
  stroke-opacity:1
}

#right-shadow {
  opacity:1;
  fill:#220b28;
  fill-opacity:1;
  stroke:none;
  stroke-width:0.534506;
  stroke-miterlimit:4;
  stroke-dasharray:none;
  stroke-opacity:1
}

#b {
  fill:#ee4433;fill-opacity:1;stroke:none;stroke-width:0.534506;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1
}

#m {
  fill:#eed043;
  animation: none;
  fill-opacity:1;
  stroke:none;
  stroke-width:0.534506;
  stroke-miterlimit:4;
  stroke-dasharray:none;
  stroke-opacity:1
}

/* Heart color animation */
@keyframes rainbow {
  0%,
  100% {
    fill: #ee2722;
  }
  10% {
    fill: #e81d1d;
  }
  20% {
    fill: #e8b71d;
  }
  30% {
    fill: #e3e81d;
  }
  40% {
    fill: #1de840;
  }
  50% {
    fill: #1ddde8;
  }
  60% {
    fill: #2b1de8;
  }
  70% {
    fill: #dd00f3;
  }
  80% {
    fill: #dd00f3;
  }
  90% {
    fill: #ffb6c1;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #111;
  }
  
  #left-shadow, #right-shadow {
    fill: lightseagreen;
  }
}

/* CSS + animation changes for prefers reduced motion */
@media (prefers-reduced-motion: no-preference) {
  #m {
    animation: rainbow 25s linear infinite;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console