Use the correct animation-timing-function :
http://jsfiddle.net/rfGDD/1/ (only for WebKit)
.motion.play .frame { -webkit-animation-name: flash; -webkit-animation-duration: 3s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: normal; -webkit-animation-fill-mode:forwards; -webkit-animation-timing-function:steps(3, end); }
MDN document on fill-mode
MDN document on direction
MDN document in steps() the synchronization function
Edit
Oops, just realized a logical flaw.
Fixed: http://jsfiddle.net/rfGDD/3/ (only for WebKit)
In addition to the above change, change the flash animation as follows:
@-webkit-keyframes flash { 0% { opacity: 1; } 33% { opacity: 0; } 100% { opacity: 0; } }
The problem is that the animation plays for 3 seconds, but each element must remain in opacity:0 after the second # 1, so I need to divide the animation into 2 stages (with a ratio of length 1: 2), so the elements may look like they remain in the final stage for 2 seconds.
source share