I have an arrow that I want to animate so I read about animations and I noticed I can achieve this with css keyframes and svg.
So basically I want to draw an arrow from 0 to 100%, so I have a path like:
<path class="showUp" fill="#4C9FDC" stroke="#000000" stroke-width= "0" d="M165.15 204.15l-4.49-4.49c-2.13-2.13-5.59-2.14-7.72-.01l-.01.01c-2.13 2.13-2.14 5.59-.01 7.72l.01.01 9.09 9.09a4.418 4.418 0 0 0 6.24 0l50.28-50.28c2.12-2.1 2.13-5.53.03-7.65l-.03-.03c-2.13-2.13-5.59-2.14-7.72-.01l-.01.01-45.66 45.63z"/>
And I want to animate with stroke like:
@keyframes Arrow {
from {
stroke-dashoffset: 1000;
}
to {
stroke-dashoffset: 0;
}
}
.showUp {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: Arrow 5s linear forwards;
}
But it just doing nothing. What am I doing wrong there? Regards