1.首先看效果
2、代码及分析
 <style type="text/css">
#div1
{
margin:100px;
position: absolute;
text-align: center;
background: #abcdef;
width: 300px;
height: 20px;
line-height: 20px;
} @-webkit-keyframes move
{
0%
{
-webkit-transform:translateY(0px)
} 100%
{
-webkit-transform:translateY(-15px)
}
} #div1 span:nth-of-type(1){ -webkit-animation:.5s move alternate infinite; }
#div1 span:nth-of-type(2){ -webkit-animation:.5s .1s move alternate infinite;}
#div1 span:nth-of-type(3){ -webkit-animation:.5s .2s move alternate infinite;}
#div1 span:nth-of-type(4){ -webkit-animation:.5s .3s move alternate infinite;}
#div1 span:nth-of-type(5){ -webkit-animation:.5s .4s move alternate infinite;}
#div1 span:nth-of-type(6){ -webkit-animation:.5s .5s move alternate infinite;}
#div1 span:nth-of-type(7){ -webkit-animation:.5s .6s move alternate infinite;}
#div1 span:nth-of-type(8){ -webkit-animation:.5s .7s move alternate infinite;} </style>
</head>
<body>
<div id="div1">
<span>正</span> <span>在</span> <span>加</span> <span>载</span> <span>中</span><span>.</span><span>.</span><span>.</span> </div>
</body>
------------------------------------------------------------------------------
alternate infinite alternate:动画循环执行,infinite:执行无限次 
--分析:1、按照顺序的执行,也就是说延迟时间会逐渐增加
解释:  -webkit-animation:.5s/*执行时间*/ .1s/*延迟时间*/ move alternate infinite;} 
查看效果(建议用Chrome浏览器):
http://www.tuzizjf.com/project/css30812.html

css3动画之1--animation小例子的更多相关文章

  1. Css3动画-@keyframes与animation

    一.@keyframe 定义和用法 @keyframes是用来创建帧动画的,我们通过这个属性可以用纯css来实现一些动画效果. 一般格式是: @keyframes 动画名称{ 0%{ 动画开始时的样式 ...

  2. CSS3动画产生圆圈由小变大向外扩散的效果

    涉及到 CSS3 的动画(animation).2D 转换(transform: scale),具体如代码所示. github: https://github.com/wind-stone/CSS3- ...

  3. CSS3动画 相比JS Animation 哪个更快?

    CSS vs. JS Animation: 哪个更快? 基于JavaScript的动画竟然已经默默地比CSS的transition动画快了?而且,Adobe和 Google竟然一直在发布可以媲美原生应 ...

  4. CSS3动画属性之Animation

    首先定义一个动画规则: @keyframes mymove { from {top:0px;} to {top:200px;} } @-moz-keyframes mymove /* Firefox ...

  5. CSS3动画效果之animation

    先解决上一篇的遗留问题. div { width: 300px; height: 200px; background-color: red; -webkit-animation: test1 2s; ...

  6. CSS3动画 transition和animation的用法和区别

    transition和animation都是CSS3新增的特性,使用时需要加内核 浏览器 内核名称 W3C   IE  -ms-  Chrome/Safari -webkit-   Firefoc - ...

  7. css3动画入门transition、animation

    css3动画 transition.animation CSS3 transition demo <!DOCTYPE html> <html> <head> < ...

  8. CSS3动画的使用

    0921自我总结 CSS3动画的使用 一.动画的创建 @keyframes规则是创建动画 浏览器兼容 1.@keyframes myfirst 2.@-webkit-keyframes myfirst ...

  9. 30分钟玩转css3动画, transition,animation

    其实css3动画是就是2种实现,一种是transition,另一种就是animation.transition实现的话就是只能定制开始帧,和结束2帧:而animation实现的话可以写很多关键帧.没有 ...

  10. CSS3 动画animation

    关键帧 什么是关键帧.一如上面对Flash原理的描述一样,我们知道动画其实由许多静态画面组成,第一个这样的静态画面可以表述为一帧.其中关键帧是在动画过程中体现了物理明显变化的那些帧. 比如之前的例子中 ...

随机推荐

  1. Hibernate连接池断开自动重连

    异常: javax.servlet.ServletException: org.springframework.transaction.CannotCreateTransactionException ...

  2. C# Thu Mar 1 00:00:00 UTC+0800 2012 如何转换为2012-03-01

    string s = "Thu Mar 1 00:00:00 UTC+0800 2012"; DateTime dt = DateTime.ParseExact(s, " ...

  3. 不抛异常的swap函数

    namespace AStuff{ template<typename T> class A { public: void swap(A *other) { using std::swap ...

  4. (C/C++学习)11.随机数组的快速查找

    说明:利用随机函数生成一个随机数组,然后对数组进行排列,再利用二分查找快速查找一个数. 一.生成随机数组 time_t ts; //等价于long ts; unsigned int num = tim ...

  5. Chat Group gym101775A(逆元,组合数)

    传送门:Chat Group(gym101775A) 题意:一个宿舍中又n个人,最少k(k >= 3)个人就可以建一个讨论组,问最多可以建多少个不同的讨论组. 思路:求组合数的和,因为涉及除法取 ...

  6. java的四舍五入及取整

    四舍五入用 Math.round(double a): 向上取整用 Math.ceil(double a): 向下取整用 Math.floor(double a):

  7. 【Codeforces 225C】Barcode

    [链接] 我是链接,点我呀:) [题意] 让你把每一列都染成一样的颜色 要求连续相同颜色的列的长度都大于等于x小于等于y 问你最少的染色次数 [题解] 先求出每一列染成#或者.需要染色多少次 设f[0 ...

  8. 2019字节跳动冬令营day7娱乐赛19题题解

    啊没去听讲题,也没发纸质题解,电子版题解也没有 为最后几个unsolve自闭了一段时间才全都A掉 3个队友写的我没看的题通过人数蛮多就不管了 题目地址:https://pan.baidu.com/s/ ...

  9. [tsA1491][2013中国国家集训队第二次作业]家族[并查集]

    m方枚举,并查集O(1)维护,傻逼题,,被自己吓死搞成神题了... #include <bits/stdc++.h> using namespace std; struct tri { i ...

  10. RDS for MySQL Online DDL 使用

    https://help.aliyun.com/knowledge_detail/41733.html?spm=5176.7841698.2.17.u67H3h