我有一个关于 css 步骤动画的问题,所以我有 12 张图片,我想像动画 gif 一样滑动这些图片。但我无法做到这一点。
我的演示:http ://cssdeck.com/labs/full/9hwv565g
我想要什么:http ://cssdeck.com/labs/css-image-sprite-animations-with-steps-function
body {
text-align: center;
}
@-webkit-keyframes wink {
from { background-position: 0px; }
to { background-position: -500px; }
}
@-moz-keyframes wink {
from { background-position: 0px; }
to { background-position: -500px; }
}
@keyframes wink {
from { background-position: 0px; }
to { background-position: -500px; }
}
.hi {
width: 120px;
height: 120px;
background-image: url("http://i44.tinypic.com/nq7mrp.png");
margin: 0 auto;
-webkit-animation: wink .8s steps(10, end) infinite;
-moz-animation: wink .8s steps(10, end) infinite;
animation: wink .8s steps(10, end) infinite;
}
你能帮助我吗?提前致谢