<style>
div,
body{
margin: 0;
padding: 0;
}
body{
background-color: #333;
}
@keyframes runnings{
0%{
background-position: 0% 0%;
}
100%{
background-position: -1500px 0%;
}
}
@-webkit-keyframes runnings{
0%{
background-position: 0% 0%;
}
100%{
background-position: -1500px 0%;
}
}
.running{
width: 100px;
height: 100px;
background: url(http://7xov8j.com1.z0.glb.clouddn.com/open-moveImg.png) 0 0 no-repeat;
background-size: cover;
margin: 0 auto;
-webkit-animation: runnings 1s steps(15) infinite;
-moz-animation: runnings 1s steps(15) infinite;
-ms-animation: runnings 1s steps(15) infinite;
-o-animation: runnings 1s steps(15) infinite;
animation: runnings 1s steps(15) infinite;
}
</style> <!-- 结构 -->
<div class="running"></div>

注:keyframes 里的background-position的计算,容器的长度*steps。

animation 动画重播的更多相关文章

  1. Android Animation动画详解(二): 组合动画特效

    前言 上一篇博客Android Animation动画详解(一): 补间动画 我已经为大家介绍了Android补间动画的四种形式,相信读过该博客的兄弟们一起都了解了.如果你还不了解,那点链接过去研读一 ...

  2. CSS3 animation 动画

    今天看到一个很酷的logo看了下他用的是animation 动画效果,就拿来做例子 浏览器支持 Internet Explorer 10.Firefox 以及 Opera 支持 animation 属 ...

  3. css3 animation动画特效插件的巧用

    这一个是css3  animation动画特效在线演示的网站 https://daneden.github.io/animate.css/ 下载 animate.css文件,文件的代码很多,不过要明白 ...

  4. Android Property Animation动画

    3.0以前,android支持两种动画模式,tween animation,frame animation,在android3.0中又引入了一个新的动画系统:property animation,这三 ...

  5. android Animation 动画绘制逻辑

    参考:http://www.jianshu.com/p/3683a69c38ea 1.View.draw(Canvas) 其中步骤为:/* * Draw traversal performs seve ...

  6. 转 iOS Core Animation 动画 入门学习(一)基础

    iOS Core Animation 动画 入门学习(一)基础 reference:https://developer.apple.com/library/ios/documentation/Coco ...

  7. css3 animation动画技巧

    一,css3 animation动画前言 随着现在浏览器对css3的兼容性越来越好,使用css3动画来制作动画的例子也越来越广泛,也随着而来带来了许多的问题值得我们能思考.css3动画如何让物体运动更 ...

  8. 【Android 基础】Animation 动画介绍和实现

    在前面PopupWindow 实现显示仿腾讯新闻底部弹出菜单有用到Animation动画效果来实现菜单的显示和隐藏,本文就来介绍下吧. 1.Animation 动画类型 Android的animati ...

  9. css3 transition属性变化与animation动画的相似性以及不同点

    下面列子中的2个图片的效果. http://zqtest.e-horse.cn/DongXueImportedCar/assets/mouseOverAnimate.html 第一个为transiti ...

随机推荐

  1. status bar、navigationBar、tableView吸顶view设置

    1. 隐藏navigationBar self.navigationController.navigationBar.hidden = YES; 2. status bar设置 -(void)view ...

  2. macOS sierra 10.12 Cocoapods 私有库

    使用Cocoapods创建私有podspec 见文章:http://www.cocoachina.com/ios/20150228/11206.html 或http://blog.wtlucky.co ...

  3. redis学习教程地址

    http://www.yiibai.com/redis/redis_quick_guide.html

  4. Windows Server 2008 R2组策略设置计算机配置和用户配置

    一.认识Windows Server 2008 R2域控组策略管理 1.域控服务器zhuyu.com的组策略管理默认会读取AD用户和计算机目录下创建的OU容器(组织单元), 在对应的OU容器创建对应的 ...

  5. C# async and await

    C# 5.0中引入了async 和 await.这两个关键字可以让你更方便的写出异步代码. 看个例子: public class MyClass { public MyClass() { Displa ...

  6. html radio check

    {% if classes|count > 1 %} <div class="class_checkbox" id="class_checkbox" ...

  7. csuoj 1394: Virus Replication

    http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1394 1394: Virus Replication Time Limit: 1 Sec  Mem ...

  8. FTF登入tiny210开发板

    配置环境一: 第一步:安装虚拟机             1)安装虚拟机+Linux12.04             2)安装FTP软件 第二步:配置超级终端(串口)             1)开 ...

  9. 使用Python统计深圳市公租房申请人省份年龄统计

    使用Python,HtmlParser来统计深圳市保障房申请人的原籍省份分布,年龄分布等.从侧面可以反映鹏城人的地域分布.以下python代码增大了每一次获取的记录数,从而少提交几次请求.如果按照WE ...

  10. js基础练习二之简易日历

    今天学到了js基础教程3,昨天的课后练习还没来的及做,这个是类似简易日历的小案例,视频还没听完,今晚继续...... 先看效果图: 其实做过前面的Tab选项卡,这个就很好理解了,通过鼠标放在不同月份月 ...