<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. centos7 使用systemd 自定义关机前脚本

    systemd (centos7) 需求,关机前执行脚本 关机脚本vi /usr/bin/shutdown_cust.sh#!/bin/bashecho "zhengchangguanji& ...

  2. Java基础——基本类型和包装类、基本类型和字符串之间的转换

    基本类型和包装类之间的转换 基本类型和包装类之间经常需要互相转换,以 Integer 为例(其他几个包装类的操作雷同哦): 在 JDK1.5 引入自动装箱和拆箱的机制后,包装类和基本类型之间的转换就更 ...

  3. magento目录结构说明,Magento文件夹结构说明,Magento folder structure

    /app – 程序根目录     /app/etc – 全局配置文件目录     /app/code – 所有模块安装其模型和控制器的目录     /app/code/core – 核心代码或经过认证 ...

  4. 当利用pip安装模块出现错误时咋办

    >在DOS窗口中到Python安装路径的scripts中执行  pip install pyperclip 出现错误 >>错误提示:Fatal error in launcher: ...

  5. VC6.0中友元函数无法访问类私有成员的解决办法

    举个例子: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 #inclu ...

  6. C语言第五次作业

    #include<stdio.h> int main() { int a,b,c; printf("请输入3个整数:"); scanf("%d %d %d&q ...

  7. c++友元函数

    c++友元函数分两类: 一://友员全居函数 /*#include <iostream>using namespace std;class aaa{    friend void prin ...

  8. solr 日期查询格式

    //solr 日期格式: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); //开始 ...

  9. Hash

    创建(特殊的) Hash[] Hash[‘a’,1,’b’,2]->yes Hash[‘a’,1,’b’,’b’]->no Hash[[[‘a’,1],[‘b’,2]]]->yes ...

  10. java代码优化

    优化通常包含两方面的内容:减小代码的体积,提高代码的运行效率. 1.尽量指定类的final修饰符 带有final修饰符的类是不可派生的.在Java核心API中,有许多应用final的例子,例如java ...