In short, no (some work arounds are possible)
What your line animation-count: infinte is currently doing is this for the element: animation: ani1 3s 0s infinite, ani2 3s 9s infinite;. So, since the first animation declared has an iteration count of infinite, the second will never be reached
The easiest and most conventional way would be to use javascript and animationEnd to do so (I use Craig Buckler's PrefixedEvent function but it's not necessary)
var elem = document.querySelectorAll("div")[0],
pfx = ["webkit", "moz", "MS", "o", ""];
function PrefixedEvent(element, type, callback) {
for (var p = 0; p < pfx.length; p++) {
if (!pfx[p]) type = type.toLowerCase();
element.addEventListener(pfx[p]+type, callback, false);
}
}
PrefixedEvent(elem, "animationend", function() { switchAnims(elem) });
function switchAnims(element) {
if(element.style.animationName = "ani1") {
element.style.animationName = "ani2";
} else {
element.style.animationName = "ani1";
}
}
(webkit only - other prefixes need to be added)
Otherwise for a pure CSS fix at the moment you would have to combine them as one animation. For you that would look like
@keyframes aniBoth {
0%, 16.666%, 33.333% { background: green; }
8.333%, 24.999%, 41.666% { background: red; }
50% { background: green; }
50.001% { background:white; width: 100px; }
75%, 100% { width: 100px; }
62.5%, 87.5% { width: 150px; }
}
(webkit only - other prefixes need to be added)