我试图为我的 Sprite 制作动画,它类似于 this .如果有人能展示如何让它更流畅,我将不胜感激。我的 Sprite 中只有 3 张图像,大约。 1秒延迟,所以过渡很糟糕。
我试过使用:
from {
-webkit-transform: translateX(..);
}
to {
-webkit-transform: translateX(..);
}
但是没有用。 如果有任何帮助,我将不胜感激。
最佳答案
尝试添加一些过渡效果,例如:
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
关于jquery - 使用 sprite 的平滑 CSS 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37413746/