css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <svg width="640px" height="360px" viewBox="0 0 640 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g id="Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M80,240 C80,266.666667 93.3333333,280 120,280 C146.666667,280 160,266.666667 160,240 L160,80 L120,80 L120,220 L200,80 L280,80 L280,120 L240,120 L240,160 L280,160 L280,200 L240,200 L240,240 L280,240 L280,280 L200,280 L200,120 L320,240 L320,80 L440,80 L440,240 L400,240 L400,120 L360,120 L360,240 L480,120 L480,160 L560,160 L560,200 L480,200 L480,240 L600,240 L600,120 L520,120 L520,80 L600,80 L600,40 L480,40 L40,40 L40,320 L600,320 L600,280 L320,280" id="jens" stroke="#000000"></path>
    </g>
</svg>
            
          
!
            
                #jens{
    stroke:#f60;
    stroke-width: 6px;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dashoffset: 2445px; /* la moitié */
    stroke-dasharray:  4891px; 
  }
            
          
!
            
              var jens = document.querySelector('#jens');

function step(){
  var d = new Date();
  var s = d.getSeconds();
  var m = d.getMilliseconds()/1000;
  jens.style.strokeDashoffset = (s+m) * (4891/60) + "px";
  requestAnimationFrame(step);
}

requestAnimationFrame(step);
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console