沒有抖動的效果,我試了很多次了。
@-webkit-keyframes rock{
? ? 0%{ transform:rotate(0deg) }?
? ? 10%{transform:rotate(3deg)}
? ? 20%{transform:rotate(-3deg)}
? ? 30%{transform:rotate(2deg)}
? ? 40%{transform:rotate(-2deg)}
? ? 50%{transform:rotate(1deg)}
? ? 60%{transform:rotate(-1deg)}
? ? 70%{transform:rotate(0deg)}
? ? 100%{transform:rotate(0deg)}
}
.c_zhongzi_box_rock{
? ? ? ? -webkit-animation:rock 2s infinite;
? ? }?
? <div class="c_zongzi_box c_zhongzi_box_rock">
沒有效果,什么問題?
2016-08-06
在-webkit-內(nèi)核瀏覽器下所有的transform需要加上-webkit-
同時其他內(nèi)核瀏覽器的特殊前綴也都要加上,如
-ms-
-o-
-moz-
2015-12-31
下面代碼中都添加上-webkit-(解決google兼容問題,在google測試試一下):-webkit-transform:rotate(0deg)
? { ?0%{ transform:rotate(0deg) }?
? ? 10%{transform:rotate(3deg)}
? ? 20%{transform:rotate(-3deg)}
? ? 30%{transform:rotate(2deg)}
? ? 40%{transform:rotate(-2deg)}
? ? 50%{transform:rotate(1deg)}
? ? 60%{transform:rotate(-1deg)}
? ? 70%{transform:rotate(0deg)}
? ? 100%{transform:rotate(0deg)}
}
2015-10-18
可能是瀏覽器不兼容吧
2015-10-18
+1 ?我也沒動畫。。。