✳ Web Tattva Labs← Back to Labs

CSS Motion Path.

Animate offset-distance to follow an authored curve without a JavaScript motion library.

View code
<svg class="route" viewBox="0 0 280 150" aria-label="Animated path" role="img"><path d="M20 102 C60 9 99 11 133 69 S215 140 260 50" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="4 6" opacity=".48"/><circle class="traveler" cx="0" cy="0" r="8" fill="currentColor"/></svg>

Technique reference ↗