Reputation: 30691
I am trying to have an element scale up from 0 on page load, but that element needs to be rotated. Seems like a simple thing, but it seems to apply the rotation after the animation finishes:
@-webkit-keyframes scale{
0%{-webkit-transform: scale(0);}
100%{-webkit-transform: scale(1);}
}
div{
-webkit-transform: rotate(30deg);
-webkit-animation: scale 2s;
}
http://jsfiddle.net/mildfuzz/wnpVp/
Upvotes: 2
Views: 230
Reputation: 59799
You need to use the transform
shorthand within the @keyframes
rule, as your rotate()
function is outside the rule and thus not animating like you expected.
Upvotes: 2