Pen Settings

HTML

CSS

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.

+ 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

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.

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

              
                <div id="letters">
<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="svg4535"
   version="1.1"
   viewBox="0 0 68.39196 66.778946">
  <defs
     id="defs4529" />
  <metadata
     id="metadata4532">
    <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(-59.759212,-58.619864)" id="layer1">
    <g
       id="text5088"
       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
       aria-label="M">
      <path
         id="m"
         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.79999924px;stroke-width:1;fill: none;stroke-miterlimit:4;stroke-dasharray:10;stroke:#000000;stroke-opacity:1"
         d="m 107.82715,101.04224 2.90343,-5.484265 v 29.840835 h -2.90343 z m 5.80686,-11.129828 2.90343,-5.484262 v 40.97066 h -2.90343 z m 5.80687,-10.968522 2.90343,-5.524586 v 51.979506 h -2.90343 z M 99.963684,99.67117 98.310341,96.646761 118.31176,58.619864 h 3.26637 z M 96.616672,93.340075 94.923003,90.275341 111.69839,58.619864 h 3.30669 z m -19.436866,2.540503 2.903433,5.484262 v 24.03397 h -2.903433 z m -5.806865,-11.049173 2.903434,5.484262 V 125.39881 H 71.372941 Z M 65.566077,73.782233 68.46951,79.306819 V 125.39881 H 65.566077 Z M 89.035488,107.97821 H 85.769126 L 62.662645,64.144451 V 125.39881 H 59.759212 V 58.619864 h 3.266362 z m 6.573048,0 H 92.30185 L 66.33226,58.619864 h 3.306688 z M 125.24775,64.144451 102.14126,107.97821 H 98.834572 L 72.905308,58.619864 h 3.266362 l 24.35657,46.293616 24.31625,-46.293616 h 3.30668 v 66.778946 h -2.90342 z" />
    </g>
  </g>
</svg>
</div>
              
            
!

CSS

              
                #letters
  margin: 50px auto
  width: 20%

#m
  stroke-dasharray: 400px !important
  stroke-dashoffset: 400px !important
  animation: dash 3s ease-in-out infinite
  animation-direction: alternate !important


@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}
              
            
!

JS

              
                // calculate the length of path
// https://css-tricks.com/svg-line-animation-works/
var path = document.querySelector('#m');
var length = path.getTotalLength();
console.log(length)
              
            
!
999px

Console