CSS Animate SVG stroke stop at last frame -


codepen

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

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -