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原理的描述一样,我们知道动画其实由许多静态画面组成,第一个这样的静态画面可以表述为一帧.其中关键帧是在动画过程中体现了物理明显变化的那些帧. 比如之前的例子中 ...
随机推荐
- swap() 函数实现的方法
swap()函数总结: 一.利用临时变量 1.引用(交换任意类型) template <typename T> void swap(T& x,T& y) { T tmp; ...
- Bootstrap练习:可折叠下拉菜单
代码: <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UT ...
- 【模板】Link-Cut Tree
#include<cstdio> #include<algorithm> #define N 500010 #define rg register #define ls (c[ ...
- yum http源
统一集群内,有一个yum本地源即可,集群内其他机器的yum可配成http源 方法: yum1:本地yum源节点 yum2:集群内其他节点 yum1: ①service httpd start ②mki ...
- ganglia3.7.2,web3.7.1安装
1.准备安装包 ganglia-3.7.2-2.el6.x86_64.rpm ganglia-gmetad-3.7.2-2.el6.x86_64.rpm ganglia-gmond-3.7.2-2.e ...
- iOS学习笔记18-CoreData你懂的
一.CoreData介绍 CoreData是iOS5之后新出来的的一个框架, 是对SQLite进行一层封装升级后的一种数据持久化方式. 它提供了对象<-->关系映射的功能,即能够将OC对象 ...
- Sencha Toucha 2.1 文件上传
javascript代码: Ext.onReady(function() { Ext.create('Ext.form.Panel', { title: 'Upload a Photo', width ...
- TOYS POJ 2318 计算几何 叉乘的应用
Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 15060 Accepted: 7270 Description Calc ...
- Retrofit网络框架入门使用
1.简单介绍 retrofit事实上就是对okhttp做了进一步一层封装优化. 我们仅仅须要通过简单的配置就能使用retrofit来进行网络请求了. Retrofit能够直接返回Bean对象,比如假设 ...
- CSDN挑战编程——《绝对值最小》
绝对值最小 题目详情: 给你一个数组A[n],请你计算出ans=min(|A[i]+A[j]|)(0<=i,j<n). 比如:A={1, 4, -3}, 则: |A[0] + A[0]| ...
2、代码及分析