@-webkit-keyframes loading {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
有这样一段代码定义了一个动画loading,那么定义这个keyframes的时候已经加上了-webkit-前缀了,还需要在代码当中写那个不加前缀的transform吗?
It is only for compatibility with older versions of
-webkit-
kernel browsersIf you are sure that the browser is old enough, you can use it directly
-webkit-transform: rotate(0deg);
.If you are sure that the browser is new enough, you can use it directly
transform: rotate(0deg);
New browsers will recognize it first
transform: rotate(0deg);