How to put animation in loop? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to put animation in loop?

please provide me a code to put animation in loop

23rd Jan 2017, 8:02 PM
Tafsil Razaa
Tafsil Razaa - avatar
6 Answers
+ 6
Hey @visph how to make a gradient stop-color animation?? I tried this : <stop stop-color="red" ……> <animate attributeName="stop-color" ……> </stop> ……but it didn't work… ~_~
23rd Jan 2017, 9:09 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 5
(@visph grammatical mistake : "indefinte -> indefinite")
23rd Jan 2017, 9:04 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
For css animation, use 'infinite' special value for the 'animation-iteration-count' property value: animation-iteration-count:infinite;
23rd Jan 2017, 8:42 PM
visph
visph - avatar
+ 3
For svg animation: <shape> <animate repeatCount="indefinite" ... > </shape> For chained animations: <shape> <animate id="anim1" begin="0s; anim2.end" dur=... > <animate id="anim1" begin="anim1.end" dur=... > </shape>
23rd Jan 2017, 8:53 PM
visph
visph - avatar
+ 2
@VH: You made at least one mistake: the attribute name is 'stop-color' and not 'color-stop'... Next, I don't know your other attributes of <animate> tag: for animate color, use 'values' attribut... ( don't know if 'from' and 'to' are effective: I search another solution before finding I had forgot a letter in attribute name, so I wasn't succesfull ^^ ). Results of my tests here: https://code.sololearn.com/Wvac74Zd8Ry3/#html
23rd Jan 2017, 10:06 PM
visph
visph - avatar
+ 1
( @VH corrected, thanks ^^ )
23rd Jan 2017, 9:05 PM
visph
visph - avatar