Reputation: 4180
My issue is that I have a simple twitter sprite sheet that I'm using to animate on hover. But, in Chrome, while it scoots left on hover, it doesn't animate.
#tw:hover #twitter-bird {
margin-left:-100px;
-webkit-animation: fly 0.2s steps(3) 0 3;
-moz-animation: fly 0.2s steps(3) 0 3;
animation: fly 0.2s steps(3) 0 3;
}
@-webkit-keyframes fly {
from { background-position: 0 0; }
to { background-position: -450px 0; }
}
@-moz-keyframes fly {
from { background-position: 0 0; }
to { background-position: -450px 0; }
}
@keyframes fly {
from { background-position: 0 0; }
to { background-position: -450px 0; }
}
I have seen a few others posts about this:
And most of the advice seems to be that "-webkit-" is needed to preface "animation: " in the css for chrome. But I've done that. What am I missing to get this bird to flap in chrome as well as it does in Safari and Firefox? I'll use Javascript or jQuery if I have to. Thank you!
Upvotes: 0
Views: 1255
Reputation: 64164
Your property
animation: fly 0.2s steps(3) 0 3;
is probably wrong. If you want to say that there is no delay, make it clearer and set the unit
animation: fly 0.2s steps(3) 0s 3;
But this would be equivalent to
animation: fly 0.2s steps(3) 3;
that is a more usual way to set it
Upvotes: 2