0
所以我来到了this google doodle左右,我想知道你怎么能用CSS来管理这种轮换(谷歌涂鸦是一个gif)。它看起来像只围绕一个轴旋转,如果我在CSS中旋转,它围绕x和y轴旋转。这是可能的3D旋转(从未使用过,所以我不知道)。CSS动画:围绕X轴旋转?
我在JSfiddle中做了一个基本示例。
HTML:
<div class="rotatediv">
</div>
CSS:
.rotatediv {
background-color: red;
width:500px;
height:500px;
animation-name:rotate_animation;
animation-duration: 15s;
animation-delay:0s;
animation-iteration-count: infinite;
}
@keyframes rotate_animation {
0% {transform: rotate(0deg);}
100% {transform: rotate(360deg);}
}