我无法让我的图像逆时针旋转

时间:2016-02-17 09:51:46

标签: jquery html css css3 animation

我让我的图像逆时针旋转有问题我觉得我可能错过了一个简单的步骤,这是我的代码:请修复此代码。

.image {     
    position: absolute;     
    top: 30%;     
    left: 37%;     
    width: 430px;     
    height: 430px;     
    margin:210px 0 0 -60px;    
    -webkit-animation:spin 75s linear infinite;     
    -moz-animation:spin 75s linear infinite;     
    animation:spin 75s linear infinite; 
} 
.redline {     
    position: absolute;    
     top: 30%;     
    left: 37%;     
    width: 430px;     
    height: 430px;     
    margin:210px 0 0 -60px;     
    -webkit-animation:spin 35s linear infinite;     
    -moz-animation:spin 35s linear infinite;     
    animation:spin 35s linear infinite; 
}  
@-moz-keyframes spin { 
    100% { transform-moz-transform: spin(-720deg); } 
}

1 个答案:

答案 0 :(得分:0)

旋转图片或div rotate(180deg)有效。您可以在180的位置使用任何值。看看代码片段的工作原理

.image {
    	width:50%;
    	-webkit-transition: -webkit-transform 3s ease-in;
    	-webkit-transform: rotate(180deg); 
    	-moz-transform: rotate(180deg);
    }
<img class="image" src="http://www.keenthemes.com/preview/conquer/assets/plugins/jcrop/demos/demo_files/image1.jpg" />

相关问题