-webkit-animation:仍旧是一个复合属性,
 
-webkit-animation: name duration timing-function delay iteration_count direction;
 
包括以下几个属性
 
(1)  -webkit-animation-name    这个属性的使用必须结合@-webkit-keyframes一起使用
 
eg:  @-webkit-keyframes fontchange{
 
0%{font-size:10px;}
 
30%{font-size:15px;}
 
100%{font-siez:12px;}
 
}
 
百分比的意思就是duration的百分比,如果没有设置duration的话,则表示为无穷大
 
div{ -webkit-animation-name:fontchange;}
 
(2)-webkit-animation-duration   表示动画持续的时间
 
(3)-webkit-animation-timing-function  表示动画使用的时间曲线
 
【语法】: -webkit-animation-timing-function: ease | linear | ease-in | ease-out | ease-in-out
 
(4)-webkit-animation-delay    表示开始动画之前的延时
 
【语法】 -webkit-animation-delay: delay_time;
 
(5)-webkit-animation-iteration-count  表示动画要重复几次
 
【语法】-webkit-animation-iteration-count: times_number;
 
(6) -webkit-animation-direction   表示动画的方向
 
【语法】-webkit-animation-direction: normal(默认)  | alternate
 
normal  方向始终向前
 
alternate 当重复次数为偶数时方向向前,奇数时方向相反
 
【另外】跟animation有关的其他属性
 
(1)-webkit-animation-fill-mode : none (默认)| backwards | forwards | both  设置动画开始之前和结束之后的行为(测试结
 
果不是很清晰)
 
(2)-webkit-animation-play-state: running(默认) | paused  设置动画的运行状态
 
综合案例:
 
@-webkit-keyframes fontbulger {
0% {
font-size: 10px;
}
30% {
font-size: 15px;
}
100% {
font-size: 12px;
}
}
 
#box {
-webkit-animation-name:  fontbulger;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count:3;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: ease-out;
-webkit-animation-fill-mode: both;
-webkit-animation-delay: 2s;
}
 
<div id=”box”>文字变化</div>
 
 

css3——webkit-animation动画的更多相关文章

  1. 模仿百度首页“元宵节汤圆”动图,并实现360°不停旋转(CSS3的animation动画效果)

    模仿百度首页“元宵节汤圆”动图,并实现360°不停旋转(CSS3的animation动画效果) 效果图: 切图地址: https://ss1.bdstatic.com/5eN1bjq8AAUYm2zg ...

  2. 第100天:CSS3中animation动画详解

    CSS3属性中有关于制作动画的三个属性:Transform,Transition,Animation: 一.Animation定义动画 CSS3的Animation是由“keyframes”这个属性来 ...

  3. CSS3 :animation 动画

    CSS3动画分为二部份: 1.定义动画行为: 使用@keyframes定义动画行为,有两种方式: 方式一:仅定义动画起始样式,与动画结束样式 @keyframes (动画行为名称) { from {b ...

  4. 监听css3的animation动画和transition事件

    webkit-animation动画有三个事件: 开始事件: webkitAnimationStart 结束事件: webkitAnimationEnd 重复运动事件: webkitAnimation ...

  5. CSS3:animation动画

    animation只应用在页面上已存在的DOM元素上,学这个不得不学keyframes,我们把他叫做“关键帧”. keyframes的语法法则: @keyframes flash { from{ le ...

  6. css3的animation动画

    animation 设置对象的动画特效   有6个主要的值 animation-name   动画名称 animation-duration   动画持续时间 animation-timing-fun ...

  7. css3 animation动画特效插件的巧用

    这一个是css3  animation动画特效在线演示的网站 https://daneden.github.io/animate.css/ 下载 animate.css文件,文件的代码很多,不过要明白 ...

  8. 【CSS3】transition过渡和animation动画

    转自:http://blog.csdn.net/XIAOZHUXMEN/article/details/52003135 写在前面的话: 最近写css动画发现把tansition和animation弄 ...

  9. CSS3 animation 动画

    今天看到一个很酷的logo看了下他用的是animation 动画效果,就拿来做例子 浏览器支持 Internet Explorer 10.Firefox 以及 Opera 支持 animation 属 ...

  10. css3 animation动画技巧

    一,css3 animation动画前言 随着现在浏览器对css3的兼容性越来越好,使用css3动画来制作动画的例子也越来越广泛,也随着而来带来了许多的问题值得我们能思考.css3动画如何让物体运动更 ...

随机推荐

  1. 从头开始-04.C语言中流程控制

    分支结构: if语句:当条表达式满足的时候就执行if后面大括号中语句 三种格式: if,if else , if else if else 特点:1.只有一个代码块会被执行 2.若有else那么必有一 ...

  2. JQ对JSON的增删改

    var userlist={ }, } } //方法一 userlist.row1.sex="女";//添加 userlist.row3={name:};//添加 userlist ...

  3. dev中 使用一些控件后,窗体屏蔽右键某些菜单

    使用Ribbon时,ribbonControl1.ShowToolbarCustomizeItem=false; 使用LayoutControl时,layoutControl1.AllowCustom ...

  4. C# 启动EXE文件及带启动参数EXE

    (一).先制作一个带启动参数的EXE文件. 步骤: 1.定义全局私有变量:private string[] s = new string[1];  //这里为了简单起见,只做一个参数 2.  在窗体的 ...

  5. HDU 1829 - A Bug's Life

    Problem Description Background Professor Hopper is researching the sexual behavior of a rare species ...

  6. [string]Valid Parentheses

    Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the inpu ...

  7. (Qt 翻译) QGLAbstractScene

    QGLAbstractScene Class Reference #include <QGLAbstractScene> This class was introduced in Qt3D ...

  8. Almost Prime

    Description Almost Prime time limit per test: 2 seconds memory limit per test: 256 megabytes input: ...

  9. CPrimer Plus第12章 存储类、链接和内存管理随笔

    被static修饰的属于内部链接,不可被外部程序文件所使用一般而言,全局变量(文件作用域变量)具有静态存储期,局部变量(代码块作用域变量)具有自动存储期寄存器变量不能使用地址运算符因为被static修 ...

  10. svo:一个半直接单目视觉里程计(长期更新)

    源码:https://github.com/uzh-rpg/rpg_svo/tree/master/svo 视频:https://www.youtube.com/watch?v=2YnIMfw6bJY ...