I have a small CSS3 animation called heartbounce
which makes four icons "bounce" one after the other. You can see it here (note JSFiddle only works with webkit, you'll need to add your own vendor prefix to see on other browsers)
http://jsfiddle.net/franhaselden/92euukf0/5/
img:first-child {
-webkit-animation-name: heartbounce;
-webkit-animation-duration: 0.5s;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease;
-webkit-animation-delay: 1s;
}
img:nth-child(2) {
-webkit-animation-name: heartbounce;
-webkit-animation-duration: 0.5s;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease;
-webkit-animation-delay: 1.2s;
}
img:nth-child(3) {
-webkit-animation-name: heartbounce;
-webkit-animation-duration: 0.5s;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease;
-webkit-animation-delay: 1.4s;
}
img:last-child {
-webkit-animation-name: heartbounce;
-webkit-animation-duration: 0.5s;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease;
-webkit-animation-delay: 1.6s;
}
A bit long but you get the idea.
At present this animation occurs on load of page (delayed by 1s for the first one, and then adding .2s for each of the others). The problem is I want to repeat this every 10 seconds.
- When page loads, icons bounce after 1s.
- Once all have bounced (which would be 2.6s since page load), stop.
- Wait 10 seconds.
- Repeat animation.
- Continue on in this manner...
Note: adding infinite
does not work because it simply restarts the animation with the 1s delay. It's not the solution I'm after. Try it out with the code provided and compare with steps 1-5 above and you'll see it doesn't answer the question.
Does anybody know if this sort of double-wrap animation delay is possible?