在动画实际开始之前,从目标点到初始点有一闪而过的动画。如果第二次运行,这是明显的。
我必须在同一页上多次使用它。因此,我需要它不闪烁。
@-webkit-keyframes sjl {
from {
background-position: 0px -5000px;
}
to {
background-position: 0px 0px;
}
}
@-moz-keyframes sjl {
from {
background-position: 0px -5000px;
}
to {
background-position: 0px 0px;
}
}
@-ms-keyframes sjl {
from {
background-position: 0px -5000px;
}
to {
background-position: 0px 0px;
}
}
@-o-keyframes sjl {
from {
background-position: 0px -5000px;
}
to {
background-position: 0px 0px;
}
}
@keyframes sjl {
from {
background-position: 0px -5000px;
}
to {
background-position: 0px 0px;
}
}
.sjl
/*Squirrel jump left*/
{
width: 300px;
height: 250px;
-webkit-perspective: 1000; //tried to use this and the 3 lines below but in every combination, even placing it in body but doesn't solve the problem
-webkit-backface-visibility: hidden;
-webkit-transform-style: preserve-3d;
-webkit-transform:translate3d(0, 0, 0);
-webkit-animation: sjl 1.5s steps(20) alternate;
-moz-animation: sjl 1.5s steps(20) alternate;
-ms-animation: sjl 1.5s steps(20) alternate;
-o-animation: sjl 1.5s steps(20) alternate;
animation: sjl 1.5s steps(20) alternate;
background-image:url(http://s9.postimg.org/io6wluqhb/Sjl.png) !important;
position: absolute;
float: left;
top: 120px;
left: 10px;
z-index: 999;
}
translate3d(0, 0, 0)
。http://davidwalsh.name/translate3d - robabby