css3动画之1--animation小例子
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小例子的更多相关文章
- Css3动画-@keyframes与animation
一.@keyframe 定义和用法 @keyframes是用来创建帧动画的,我们通过这个属性可以用纯css来实现一些动画效果. 一般格式是: @keyframes 动画名称{ 0%{ 动画开始时的样式 ...
- CSS3动画产生圆圈由小变大向外扩散的效果
涉及到 CSS3 的动画(animation).2D 转换(transform: scale),具体如代码所示. github: https://github.com/wind-stone/CSS3- ...
- CSS3动画 相比JS Animation 哪个更快?
CSS vs. JS Animation: 哪个更快? 基于JavaScript的动画竟然已经默默地比CSS的transition动画快了?而且,Adobe和 Google竟然一直在发布可以媲美原生应 ...
- CSS3动画属性之Animation
首先定义一个动画规则: @keyframes mymove { from {top:0px;} to {top:200px;} } @-moz-keyframes mymove /* Firefox ...
- CSS3动画效果之animation
先解决上一篇的遗留问题. div { width: 300px; height: 200px; background-color: red; -webkit-animation: test1 2s; ...
- CSS3动画 transition和animation的用法和区别
transition和animation都是CSS3新增的特性,使用时需要加内核 浏览器 内核名称 W3C IE -ms- Chrome/Safari -webkit- Firefoc - ...
- css3动画入门transition、animation
css3动画 transition.animation CSS3 transition demo <!DOCTYPE html> <html> <head> < ...
- CSS3动画的使用
0921自我总结 CSS3动画的使用 一.动画的创建 @keyframes规则是创建动画 浏览器兼容 1.@keyframes myfirst 2.@-webkit-keyframes myfirst ...
- 30分钟玩转css3动画, transition,animation
其实css3动画是就是2种实现,一种是transition,另一种就是animation.transition实现的话就是只能定制开始帧,和结束2帧:而animation实现的话可以写很多关键帧.没有 ...
- CSS3 动画animation
关键帧 什么是关键帧.一如上面对Flash原理的描述一样,我们知道动画其实由许多静态画面组成,第一个这样的静态画面可以表述为一帧.其中关键帧是在动画过程中体现了物理明显变化的那些帧. 比如之前的例子中 ...
随机推荐
- How To: Multipath Linux x86-64 Release 6.4
[root@node01 ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0 ...
- wget扒网站
wget神奇操作 整站复制 只限静态网页 wget -P 指定下载路径 -p 获取显示HTML页面所需的所有图像 -k 使链接指向本地文件 -H 递归时转到外部主机. wget --mirro ...
- 68.document增删改原理
主要知识点 document增的原理 document删的原理 document改的原理 一.document增的原理 一个document存入es大致要分以下几个步骤 (1)数据写入buffer, ...
- shell 读取目录指定文件并截取拼接
shell脚本读取指定文件并拼接成指定的版本信息
- Python-基本语法元素
#TempConvert.py TempStr = input("请输入带有符号的温度值: ") if TempStr[-1] in ['F', 'f']: C = (eval(T ...
- 【模板】Tarjan缩点
洛谷3387 #include<cstdio> #include<algorithm> #include<cstring> using namespace std; ...
- noip模拟赛 计数
[问题描述] 给出m个数a[1],a[2],…,a[m] 求1~n中有多少数不是a[1],a[2],…,a[m]的倍数. [输入] 输入文件名为count.in. 第一行,包含两个整数:n,m 第二行 ...
- Fedora15下安装Android开发环境
Fedora15下安装Android开发环境需要以下步骤: 完整步骤. 1. 安装正确版本的JDK. 2. 安装Eclipse. 3. 安装ADT. 4. 安装Android SDK. 5. 安 ...
- 用R语言 画条形图(基于ggplot2包)
1.用qplot(x,data=data,geom.=”bar”,weight=y)+scale_y_continuous("y")画出y关于x的条形. 图中提示binwidth这 ...
- ESXi License过期解决办法
http://blog.sina.com.cn/s/blog_538439270101pqls.html
2、代码及分析