transition

支持:IE10+

img{
transition: 1s 1s height ease;
}

transition-property: 属性
transition-duration: 持续时间
transition-delay: 延迟
transition-timing-function: 变化函数

          - linear cubic-bezier(0,0,1,1)
          - ease cubic-bezier(0.25,0.1,0.25,1)
          - ease-in cubic-bezier(0.42,0,1,1)
          - ease-out cubic-bezier(0,0,0.58,1)
          - ease-in-out cubic-bezier(0.42,0,0.58,1)
          - cubic-bezier(n,n,n,n) 自定义贝塞尔函数

无效的属性:display,background: url(foo.jpg)

不能重复执行,除非重复触发事件

animation

支持:IE10+

div:hover {
  animation: 1s 1s rainbow linear 3 forwards normal;
}
@keyframes rainbow {
  0% { background: #c00; }
  50% { background: orange; }
  100% { background: yellowgreen; }
}

animation-name: 对应keyframes的名称
animation-duration:持续时间
animation-timing-function:变化函数

          - linear cubic-bezier(0,0,1,1)
          - ease cubic-bezier(0.25,0.1,0.25,1)
          - ease-in cubic-bezier(0.42,0,1,1)
          - ease-out cubic-bezier(0,0,0.58,1)
          - ease-in-out cubic-bezier(0.42,0,0.58,1)
          - cubic-bezier(n,n,n,n) 自定义贝塞尔函数

          - step函数

              - 步幅:大于零的整数

              - 对齐:指定step函数是左对齐连续函数,还是右对齐连续函数。

                  start:对齐开始,第一帧发生在动画开始时,end:对齐结束,最后一帧发生在动画结束时。可选项。

                  一个step函数的例子: http://dabblet.com/gist/1745856

div:hover {
animation: 1s rainbow infinite steps(10);
}

animation-delay:延迟
animation-iteration-count:执行次数
animation-fill-mode:填充模式。决定一次动画播放完成之后是回到起始状态还是停留在结束状态

          - none 回到最初的状态
          - forwards 表示动画结束后,元素就是当前动画结束时候的状态。对应keyframe中的"to"或"100%"帧。
          - backwards 表示动画开始之前,元素处于keyframe是"from"或"0%"关键帧的状态。
          - both

animation-direction:执行方向

          - normal  0->1, 0->1, 0->1  正常播放
          - alternate  0->1, 1->0, 0->1  正常播放,倒带播放
          - reverse  1->0, 1->0, 1->0  倒带播放
          - alternate-reverse  1->0, 0->1, 1->0  倒带播放,正常播放

animation-play-state:播放状态,可以用js控制

          - paused 动画暂停
          - running 动画播放中

keyframes中,from=0%,to=100%

css transition & animation的更多相关文章

  1. Atitti css transition Animation differ区别

    Atitti  css   transition Animation differ区别 1.1. transition的优点在于简单易用,但是它有几个很大的局限.  1 1.2. Transition ...

  2. Atitti  css   transition Animation differ区别

    Atitti  css   transition Animation differ区别 1.1. transition的优点在于简单易用,但是它有几个很大的局限.  1 1.2. js 动态改变 st ...

  3. CSS Transform / Transition / Animation 属性的区别

    back21 Jun 2011 Category: tech Tags: css 最近想UI的动画转到css3能吃进3d加速的属性上面来以加强动画的连贯性.只是对于css几个新加的属性不太熟悉,常常容 ...

  4. CSS动画-transition/animation

    HTML系列: 人人都懂的HTML基础知识-HTML教程(1) HTML元素大全(1) HTML元素大全(2)-表单 CSS系列: CSS基础知识筑基 常用CSS样式属性 CSS选择器大全48式 CS ...

  5. css3 transition animation nick

    时光转眼即逝,又到周六了,今天写点某部分人看不起的css玩玩! 转换 转换属性transform: 浏览器前缀: -webkit-transform;-o-transform;-moz-transfo ...

  6. css3动画transition animation

    CSS动画简介  transition   animation transition过渡:css3通过transitions属性引入时间概念,通过开始.结束状态自动计算中间状态,实现状态改变的过渡效果 ...

  7. CSS3 & transition & animation

    CSS3 & transition & animation https://developer.mozilla.org/en-US/docs/Web/CSS/transition-ti ...

  8. A transition animation compatible Library.

    Android5.0之后为我们提供了许多炫酷的界面过渡效果,其中共享元素过渡也是很有亮点的一个效果,但这个效果只能在Android5.0之后使用,那今天我们就来将共享元素过渡效果兼容到Android4 ...

  9. No.3 - CSS transition 和 CSS transform 配合制作动画

    课程概述 作业提交截止时间:09-01 任务目的 深度理解掌握 transition-timing-function 以及它的意义 学会配合使用 CSS transform 和CSS transiti ...

随机推荐

  1. bin sh git@github.com no such file or directory

    window下使用git: 输入命令:git clone git @github.com:Alan0521/dotvim.git 出现/bin/sh:git@github.com no such fi ...

  2. Spring boot with Apache Hive

      5.29.1. Maven <dependency> <groupId>org.springframework.boot</groupId> <artif ...

  3. Running Bitvise SSH Client as a Windows Service

    It is possible to run a Windows program as a system service. The advantage of services is that they ...

  4. fork后父子进程文件描述问题

    [fork后父子进程文件描述问题] 一张图可以浅析的解释: 参考:http://wenku.baidu.com/view/dd51581bff00bed5b9f31d8e.html

  5. 更改FP SYSTEM密码

    1 Please create a new account and set a new password 2 backup table ABPPMGR.USER_PROFILE , ABPPMGR . ...

  6. 更改Mysql数据库数据存储位置的具体步骤

    首先把mysql的服务先停掉,更改MySQL配置文件My.ini中的数据库存储主路径,将老的数据库存储主路径中的数据库文件和文件夹复制到新的存储主路径,接下来重启搞定. 一.首先把mysql的服务先停 ...

  7. VMTurbo采用红帽企业虚拟化软件

    VMTurbo公司正处于虚拟化的开始阶段,并将继续向虚拟世界迈进.该公司已宣布官方支持Red Hat 公司的Enterprise Virtualization 3.1.VMTurbo公司采用Red H ...

  8. SQLSERVER的四个系统数据库

    (1)Master数据库是SQL Server系统最重要的数据库,它记录了SQL Server系统的所有系统信息.这些系统信息包括所有的登录信息.系统设置信息.SQL Server的初始化信息和其他系 ...

  9. GlobalMemoryStatusEx获取内存

    typedef struct _MEMORYSTATUSEX { DWORD dwLength; DWORD dwMemoryLoad; DWORDLONG ullTotalPhys; DWORDLO ...

  10. qt学习(三) qt布局

    使用横向与竖向.网格三种布局嵌套使用后可以组合出很复杂的界面. 这里向大家推荐这篇博客 http://www.cnblogs.com/Bonker/p/3454956.html 我这里使用布局做了一个 ...