我正在图像变换,旋转和关键帧,但我有一个问题试图让图像旋转在一个圆圈。我把它设置为旋转360deg和两个关键帧0和100.我希望图像从图像的中心点旋转,所以看起来好像加载圆正在加载一些东西。动画图像,使其旋转一圈
现在看起来图像从左上角旋转。
有没有人看到我做错了什么?
#spinning-circle {
animation-name: spinning-circle;
animation-duration: 10s;
animation-iteration-count: infinite;
width: 40px;
height: 40px;
}
@-webkit-keyframes spinning-circle {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
<div id="spinning-circle">
<img src="http://i.stack.imgur.com/WbNlQ.jpg">
</div>
完美,谢谢! – Becky