Ali Bassam
Ali Bassam

Reputation: 9959

Webkit Transform not working in a Webkit Animation

I made a simple animation that should rotate a div.

@-webkit-keyframes turn{   
    0% { -webkit-transform:(0deg); }  
    100% { -webkit-transform:(360deg); }
}

And I assigned it to the div.

#myDiv
{
    -webkit-animation-name:turn;
    -webkit-animation-duration:4s;
}

The animation is not working on Chrome, however when I use the same animation on firefox (adding -moz-) things work perfectly.

Here's the Fiddle.

Upvotes: 2

Views: 1276

Answers (1)

Pavlo
Pavlo

Reputation: 44889

You forget transforming function. The correct syntax is:

-webkit-transform: rotate(0deg)

I've updated your demo.

Upvotes: 4

Related Questions