You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varpath=document.querySelector('.squiggle-animated path');varlength=path.getTotalLength();// Clear any previous transitionpath.style.transition=path.style.WebkitTransition='none';// Set up the starting positionspath.style.strokeDasharray=length+' '+length;path.style.strokeDashoffset=length;// Trigger a layout so styles are calculated & the browser// picks up the starting position before animatingpath.getBoundingClientRect();// Define our transitionpath.style.transition=path.style.WebkitTransition='stroke-dashoffset 2s ease-in-out';// Go!path.style.strokeDashoffset='0';
The text was updated successfully, but these errors were encountered:
SVGs are not the best choice for animation, but I'd like to experiment with this neat trick for drawing lines:
From: http://jakearchibald.com/2013/animated-line-drawing-svg/
The text was updated successfully, but these errors were encountered: