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

              
                <svg id="line" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 521 2399" strokeLinecap="round" strokeMiterlimit="1">
	<path id="line-base" d="M176.22,79v71c0,27.58,7.16,33.5,18.45,42.46,11.87,9.41,26.87,9.95,38.55,9.86l35.21,0A44.78,44.78,0,0,1,301.7,217.7c13.1,13.3,12.13,29.54,12.13,40.89V289.7s1,48.43,1,61.43c0,29.35-26.8,31.3-32.47,31.3h-169c-38.09,0-54,28.18-54,60.53V734.87c0,19.56,17.73,29.6,37.82,29.8s100.7-.58,100.7-.58c24.78,0,30.85,17.48,30.85,24.52.11,10.26.22,16.61.32,26.87,0,22.69,19.18,28.5,28.5,28.5h30.59c45.91,0,71.22,36.45,71.22,66.72v63.91c0,37.82-27.92,77.22-81.13,77.22-42,0-71.62,28.69-71.62,82.83,0,25.3-.64,49.86-.64,82.82" fill="none" stroke="#ccc" stroke-width="5" />
	<path class="line-running" pathLength="1" d="M176.22,79v71c0,27.58,7.16,33.5,18.45,42.46,11.87,9.41,26.87,9.95,38.55,9.86l35.21,0A44.78,44.78,0,0,1,301.7,217.7c13.1,13.3,12.13,29.54,12.13,40.89V289.7s1,48.43,1,61.43c0,29.35-26.8,31.3-32.47,31.3h-169c-38.09,0-54,28.18-54,60.53V734.87c0,19.56,17.73,29.6,37.82,29.8s100.7-.58,100.7-.58c24.78,0,30.85,17.48,30.85,24.52.11,10.26.22,16.61.32,26.87,0,22.69,19.18,28.5,28.5,28.5h30.59c45.91,0,71.22,36.45,71.22,66.72v63.91c0,37.82-27.92,77.22-81.13,77.22-42,0-71.62,28.69-71.62,82.83,0,25.3-.64,49.86-.64,82.82" fill="none" stroke="#000" stroke-width="5" />
	<circle class="line-circle" cx="176.22" cy="80" r="5" fill="red" />
</svg>

<div class="template-footer">
	<p>This demo only works in chrome</p>
  <a href="https://youtu.be/GT0P15xAQpc"><svg xmlns="http://www.w3.org/2000/svg" width="30px" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" fill="#FF0000"/></svg></a>
  <a href="https://www.trapti.dev"> <svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 26 26">
  <defs/>
  <g fill="#030104">
    <path d="M8.083 11.222L6.419 15a.276.276 0 01-.257.154H5.31c-.113 0-.216-.061-.256-.154l-.79-1.803a15.454 15.454 0 01-.213-.517c-.073.186-.148.359-.223.525l-.833 1.8a.277.277 0 01-.255.149h-.852a.276.276 0 01-.259-.158L.072 11.217c-.03-.074-.018-.156.034-.221s.135-.103.225-.103h.959c.121 0 .227.069.263.169l.684 1.92c.057.162.11.315.159.461.06-.146.125-.3.194-.463l.842-1.932a.277.277 0 01.256-.155h.792c.115 0 .217.063.258.157l.798 1.89c.072.17.136.329.195.479.049-.142.106-.296.171-.465l.737-1.898a.275.275 0 01.26-.164h.926a.29.29 0 01.227.104.22.22 0 01.031.226zm8.922 0L15.341 15a.276.276 0 01-.256.154h-.854a.276.276 0 01-.256-.154l-.789-1.803a13.647 13.647 0 01-.214-.517c-.073.186-.148.359-.223.525l-.833 1.8a.276.276 0 01-.255.149h-.853a.277.277 0 01-.259-.158l-1.557-3.779a.218.218 0 01.034-.221.291.291 0 01.225-.103h.959c.121 0 .227.069.263.169l.683 1.92.161.461c.059-.146.123-.3.192-.463l.843-1.932a.275.275 0 01.256-.155h.792c.115 0 .218.063.258.157l.799 1.89c.071.17.135.329.193.479.051-.142.106-.296.172-.465l.737-1.898c.038-.098.144-.164.261-.164h.926c.092 0 .177.039.227.104a.218.218 0 01.032.226zm8.921 0L24.263 15a.277.277 0 01-.257.154h-.853c-.113 0-.216-.061-.256-.154l-.789-1.803a13.647 13.647 0 01-.214-.517c-.073.186-.149.359-.224.525l-.833 1.8a.277.277 0 01-.255.149h-.852a.277.277 0 01-.26-.158l-1.557-3.779c-.029-.074-.019-.156.033-.221s.136-.103.226-.103h.96c.121 0 .227.069.262.169l.684 1.92.16.461c.059-.146.123-.3.192-.463l.843-1.932a.278.278 0 01.257-.155h.791c.115 0 .218.063.258.157l.798 1.89c.072.17.137.329.196.479.049-.142.106-.296.171-.465l.738-1.898c.037-.098.142-.164.26-.164h.926c.092 0 .176.039.227.104a.224.224 0 01.031.226zM2.71 9c.283-.718.637-1.401 1.057-2.037.062.012.12.037.185.037h1.88a18.675 18.675 0 00-.49 2h2.055c.155-.699.335-1.376.562-2h9.986c.227.624.407 1.301.562 2h2.055a18.675 18.675 0 00-.49-2h1.88c.065 0 .123-.025.186-.037.418.636.773 1.319 1.056 2.037h2.121c-1.691-5.216-6.591-9-12.363-9S2.28 3.784.588 9H2.71zm17.768-4H19.29a12.54 12.54 0 00-.851-1.519c.74.428 1.422.938 2.039 1.519zm-7.526-3c1.551 0 2.983 1.154 4.062 3H8.89c1.079-1.846 2.511-3 4.062-3zM7.463 3.481c-.308.469-.592.976-.85 1.519H5.426a11.074 11.074 0 012.037-1.519zM23.194 17c-.283.719-.638 1.4-1.057 2.037-.062-.012-.12-.037-.185-.037h-1.881c.199-.634.355-1.309.49-2h-2.055a15.848 15.848 0 01-.562 2H7.959a16.018 16.018 0 01-.562-2H5.343c.135.691.291 1.366.49 2H3.952c-.065 0-.123.025-.185.037A11.107 11.107 0 012.71 17H.588c1.692 5.216 6.592 9 12.364 9s10.672-3.784 12.363-9h-2.121zM5.426 21h1.188c.258.543.542 1.051.85 1.519A11.048 11.048 0 015.426 21zm7.526 3c-1.551 0-2.983-1.154-4.062-3h8.123c-1.078 1.846-2.51 3-4.061 3zm5.488-1.481c.309-.468.593-.976.851-1.519h1.188c-.618.581-1.3 1.091-2.039 1.519z"/>
  </g>
</svg> </a>
  <a href="https://twitter.com/imtraptir"> 
<svg width="20px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 512 512">
<path style="fill:#03A9F4;" d="M512,97.248c-19.04,8.352-39.328,13.888-60.48,16.576c21.76-12.992,38.368-33.408,46.176-58.016
	c-20.288,12.096-42.688,20.64-66.56,25.408C411.872,60.704,384.416,48,354.464,48c-58.112,0-104.896,47.168-104.896,104.992
	c0,8.32,0.704,16.32,2.432,23.936c-87.264-4.256-164.48-46.08-216.352-109.792c-9.056,15.712-14.368,33.696-14.368,53.056
	c0,36.352,18.72,68.576,46.624,87.232c-16.864-0.32-33.408-5.216-47.424-12.928c0,0.32,0,0.736,0,1.152
	c0,51.008,36.384,93.376,84.096,103.136c-8.544,2.336-17.856,3.456-27.52,3.456c-6.72,0-13.504-0.384-19.872-1.792
	c13.6,41.568,52.192,72.128,98.08,73.12c-35.712,27.936-81.056,44.768-130.144,44.768c-8.608,0-16.864-0.384-25.12-1.44
	C46.496,446.88,101.6,464,161.024,464c193.152,0,298.752-160,298.752-298.688c0-4.64-0.16-9.12-0.384-13.568
	C480.224,136.96,497.728,118.496,512,97.248z"/>

</svg>
</a>
</div>
              
            
!

CSS

              
                body {
	width: 100vw;
	display: flex;
	justify-content: center;
	align-items: center;
	
}
#line {
/* 	outline: 1px solid; */
	margin-right: 100px;
	max-width: 700px;
	overflow-x: hidden;
}
.line-circle {
  transform-box: fill-box;
  offset-anchor: 50% 50%;
  offset-path: path('M176.22,79v71c0,27.58,7.16,33.5,18.45,42.46,11.87,9.41,26.87,9.95,38.55,9.86l35.21,0A44.78,44.78,0,0,1,301.7,217.7c13.1,13.3,12.13,29.54,12.13,40.89V289.7s1,48.43,1,61.43c0,29.35-26.8,31.3-32.47,31.3h-169c-38.09,0-54,28.18-54,60.53V734.87c0,19.56,17.73,29.6,37.82,29.8s100.7-.58,100.7-.58c24.78,0,30.85,17.48,30.85,24.52.11,10.26.22,16.61.32,26.87,0,22.69,19.18,28.5,28.5,28.5h30.59c45.91,0,71.22,36.45,71.22,66.72v63.91c0,37.82-27.92,77.22-81.13,77.22-42,0-71.62,28.69-71.62,82.83,0,25.3-.64,49.86-.64,82.82'); 
	offset-path: url('#line-base');
 animation: move 5s forwards linear;
  animation-timeline: scroll();
 animation-range-start: 2%;
 animation-range-end: 50%;
}

@keyframes move {
  to {
    offset-distance: 100%;
  }
}

.line-running {
   stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: line-animation 5s linear forwards;
  animation-timeline: scroll();
 animation-range-start: 2%;
 animation-range-end: 50%;
}
@keyframes line-animation {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.template-footer {
  position: fixed;
  bottom: 0;
  right: 0; 
  height: 2rem;
  border-radius: 5px 0 0 0;
  background-color: #ffffba;
  display: flex;
	gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.6rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console