I think there is a conflict with using transform twice on your .elem
elements. The animation transform: rotate()
will override transform: scale()
. You can use a wrapper element for the scale and apply the animation to the inner element.
You seem to be using zoom
in Chrome which can explain why it is working in that browser.
See this fiddle: http://jsfiddle.net/G6rYu/5/ (for Firefox and Chrome)
<div class="wrap">
<div class="box A">
<div class="elem A"></div>
</div>
</div>
<div class="wrap">
<div class="box B">
<div class="elem B"></div>
</div>
</div>
CSS
.wrap {
width: 175px;
height: 175px;
overflow: hidden;
}
.box.A {
width:175px;
/* border:1px blue solid; */
}
.box.B {
position:relative;
top:0px;
left:0px;
float:left;
height: 175px;
width:175px;
/* border:1px blue solid; */
}
.elem {
width:175px;
height:175px;
/* border:1px red solid; */
background-repeat: no-repeat;
}
.elem.A {
background-image:url('http://s24.postimg.org/ua9mzwmht/arrow.png');
}
.box.A {
animation-name: rotate;
animation-duration: 3.0s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(-360deg);
}
}
.elem.B {
background-image:url('http://s29.postimg.org/np8utnv8j/arrow2.png');
}
.box.B {
animation-name: rotate2;
animation-duration: 3.0s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes rotate2 {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}