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原理的描述一样,我们知道动画其实由许多静态画面组成,第一个这样的静态画面可以表述为一帧.其中关键帧是在动画过程中体现了物理明显变化的那些帧. 比如之前的例子中 ...
随机推荐
- 4.Linux的进程
4.1 Linux的进程 4.1.1 进程的概述 有关进程的一些基本概念: 1.什么是进程: 当程序被触发后,执行者的权限与属性.程序的程序代码与所需的数据都会被加载到内存中,操作系统并给予这个内存内 ...
- python中enumerate( )函数的使用
enumerate( )函数是遍历一个序列中的元素以及元素对应的下标 seq = ['one', 'two', 'three'] for i, element in enumerate(seq): p ...
- JAVA经典题--计算一个字符串中每个字符出现的次数
需求: 计算一个字符串中每个字符出现的次数 思路: 通过toCharArray()拿到一个字符数组--> 遍历数组,将数组元素作为key,数值1作为value存入map容器--> 如果k ...
- 找零钱的算法实现(Java)
简单的算法 基本思路就是将面值从大到小统计(外循环), 若当前金额大于某面值, 则当前金额减掉该面值, 并将面值对应张数+1, 继续往下判断(内循环) public void Change(int m ...
- The meaning of the number displayed on the man page in Linux
0 Header files 0p Header files (POSIX) 1 Executable programs or shell commands 1p Executable program ...
- BZOJ 1614 USACO 07Jan. 洛谷1948 电话线
二分+特殊姿势的check:二分最小代价P,把边权小于等于P的边设为0,其他的设为1,跑一遍最短路,判断dis[n]是否大于K #include<cstdio> #include<a ...
- BUPT2017 springtraining(16) #4 ——基础数论
题目在这里 A.手动打表找规律得组合数 n -= 2, m -= 2, ans = C(n, m) #include <bits/stdc++.h> using namespace std ...
- hdu 4707 bellman
最短路的优先队列做法: #include<stdio.h> #include<queue> #include<string.h> #define N 100010 ...
- 激活Windows
额外的启动参数(键):/win=act – 在隐藏模式下运行程序,激活 Windows 并退出程序./ofs=act – 在隐藏模式下运行程序,激活 Office 并退出程序./wingvlk – 在 ...
- Postgres 数据库字符集更改 ERROR: new encoding (UTF8) is incompatible
https://blog.csdn.net/hkyw000/article/details/52817422 http://www.cnblogs.com/taosim/articles/438329 ...
2、代码及分析