is there a way to get a webkit animation to run indefinitely?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There certainly is:
This was taken from the source, here
The important parts to observe (obviously, I suppose) are those within the
keyframes@-webkit-keyframes pulse {/*...*/}, defining the animation’s name ‘pulse’ thefrom(start), 50% mark, andto(end) (which you’ll notice is exactly the same as thefromdeclaration, to give the impression of seamless animation.On second thoughts, it seems that
-webkit-animation-iteration-count: 10;might present a problem, as regards ‘infinite.’ Omitting this property means the animation occurs once, setting the value to0(as expected) prevents the animation occurring at all.So, perhaps not infinite, but it seems happy with a value of
3000, so presumably other similarly-large numbers would be do-able.Revised demo with super-large
-webkit-animation-iteration-countof over nine-thousaaaaaand…Edited in surprise:
Apparently
infiniteis, in fact, a valid argument for the-webkit-animation-iteration-count. See the newest demo, at jsbin (again).