You can use steps as your timing-function to pause the animation until the next keyframe
CSS:
-webkit-animation-timing-function: steps(1, end);
-moz-animation-timing-function: steps(1, end);
-ms-animation-timing-function: steps(1, end);
-o-animation-timing-function: steps(1, end);
animation-timing-function: steps(1, end);
Sample code:
@keyframes quick {
0% {
background-color:green;
}
50% {
-webkit-animation-timing-function: steps(1, end);
-moz-animation-timing-function: steps(1, end);
-ms-animation-timing-function: steps(1, end);
-o-animation-timing-function: steps(1, end);
animation-timing-function: steps(1, end);
background-color:blue;
}
100% {
background-color:red;
}
}
@-o-keyframes quick {
0% {
background-color:green;
}
50% {
-o-animation-timing-function: steps(1, end);
background-color:blue;
}
100% {
background-color:red;
}
}
@-moz-keyframes quick {
0% {
background-color:green;
}
50% {
-moz-animation-timing-function: steps(1, end);
background-color:blue;
}
100% {
background-color:red;
}
}
@-webkit-keyframes quick {
0% {
background-color:green;
}
50% {
-webkit-animation-timing-function: steps(1, end);
background-color:red;
}
100% {
background-color:blue;
}
}
body {
height:100%;
width:100%;
animation:quick 3s;
-moz-animation:quick 3s;
-webkit-animation:quick 3s;
-o-animation:quick 3s;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
http://jsfiddle.net/sC5fy/1/