我使用 css 动画创建了一个 3d 旋转立方体,它在 Mozilla 中运行良好,但是当我在 webkit 浏览器中运行它时,我有旋转动画,但 6 个图像没有按应有的方式翻译。但是,如果我禁用动画,则 6 个图像会按要求进行翻译,并且我有一个立方体。有没有人遇到过这个?
@-webkit-keyframes rotate{
from {-webkit-transform: rotateX(0deg) rotateZ(0deg);}
to {-webkit-transform: rotateX(360deg) rotateZ(360deg);}
}
@-moz-keyframes rotate{
from {-moz-transform: rotateX(0deg) rotateZ(0deg);}
to {-moz-transform: rotateX(360deg) rotateZ(360deg);}
}
.object{
transform-style:preserve-3d;
width:300px;
height:300px;
top: 150px;
margin:0 auto;
position:absolute;
-moz-animation-name: rotate;
-moz-animation-duration: 5s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
-webkit-animation-name: rotate;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;}
这是立方体的 jsfiddle http://jsfiddle.net/timwilks13/SRU34/1/ 和托管版本http://www.bettondesignwork.co.uk/tim/css