CSS Animate SVG stroke stop at last frame -
in above codepen there svg stroke animates view, @ end disappears.
is there way keep view once loaded?
.path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: dash 5s linear alternate; } @keyframes dash { { stroke-dashoffset: 1000; } { stroke-dashoffset: 0; } }
add these 2 properties .path
animation-fill-mode: forwards; // stay on last frame animation-iteration-count: 1;// run once css be:
.path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: dash 5s linear alternate; animation-fill-mode: forwards; // stay on last frame animation-iteration-count: 1; } codepen here,its working fine.
Comments
Post a Comment