How can I have two CSS animations playing at different speeds?
Example Code:
.image {
position: absolute;
top: 50%;
left: 50%;
width: 120px;
height: 120px;
margin:-60px 0 0 -60px;
-webkit-animation:spin 2s linear infinite;
-webkit-animation:scale 4s linear infinite;
}
@-webkit-keyframes spin {
100% {
transform: rotate(180deg);
}
}
@-webkit-keyframes scale {
100% {
transform: scaleX(2) scaleY(2);
}
}
http://jsfiddle.net/Ugc5g/3388/ - only one animation (the last one declared) plays.
In case anyone new is coming along and catching this thread, you can specify multiple animations--each with their own properties--with a comma.
Example:
animation: rotate 1s, spin 3s;