Here is the code for animation :
circle {
stroke-width: 21;
stroke-dashoffset: 400;
stroke: url(#color);
fill: none;
animation: stroking 60s linear forwards infinite;
}
@keyframes stroking {
from {
stroke-dashoffset: 100%;
}
to {
stroke-dashoffset: 0%;
}
}
<svg height="500px" width="500px">
<defs>
<linearGradient id="color">
<stop offset="0%" stop-color="#e91e63" />
<stop offset="100%" stop-color="#673ab7" />
</linearGradient>
</defs>
<circle cx="250px" cy="250px" r="210px" />
</svg>
Output:
The linear gradient should change but nothing seems to happen.
Please tell me how can I make this animation work.