Wednesday, 5 November 2014

Let It Spin!

Rotating Coin
When you put the cursor on top of the coin it will start spinning around.
To let it spin you have to choose the length of the rotation which is set through animation:rotation (this is the name of the animation so you can choose a random name): seconds s.
In order to show the animation in all browsers don't forget to put the prefix -webkit- in front of the property.
Details of the animation are described in @keyframes rotation. The coin is spinning laterally meaning on its y-axis therefore transform property is set to rotateY(deg).


HTML Code


CSS Code

No comments:

Post a Comment