例:

-webkit-animation: myfirst 5s linear 2s infinite alternate;
animation: myfirst 5s linear 2s infinite alternate; @keyframes myfirst{
  from{background:red;}
  to{background:yellow;}
}
@-webkit-keyframes myfirst{
  frome{background:red;}
  to{background:yellow;}
}
//或者
@keyframes myfirst{
  0%{ }
  25%{ }
  50%{ }
  100%{ }
}

参数及含义:

animation-name: 动画的名字

animation-duration: 动画完成一个周期所花费的秒数,默认是0

animation-timing-function: 规定动画的速度曲线,默认是ease(动画以低速开始,然后加块,在结束前变慢);

              linear(动画从头到尾的速度是相同的)

              ease-in(动画以低速开始)

              ease-out(动画以低速结束)

              ease-in-out(动画以低速开始和结束)

animation-delay: 规定动画何时开始,默认是0;

animation-iteration-count: 规定动画被播放的次数,默认是1, infinite(无限循环)

animation-direction: 规定动画是否在下一周期逆向地播放,默认是normal(不逆向播放)

            reverse(动画反向播放)

            alternate(动画在奇数1,3,5、、、正向播放,在偶数2,4,5、、、反向播放) 

            alternate-reverse(动画在奇数次1,3,4、、、反向播放,在偶数次2,4,6、、、正向播放) 

最新文章

  1. 基于Solr的空间搜索
  2. 关于socket——SO_SNDBUF and SO_RECVBUF
  3. 利用ddmlib 实现 PC端与android手机端adb forword socket通信(转)
  4. SendMessage、PostMessage原理
  5. ubuntu下允许root用户ssh远程登录
  6. Hibernate总结(二)---hibernate中的各种映射
  7. weui中的日期选择控件关于时间段的设置!
  8. Storm Topology Parallelism
  9. openssl源代码结构
  10. Storm常用的类
  11. 使用命令行登陆数据库配置文件修改 解决ora12528
  12. phpbbchina恢复上线
  13. __stdio_common_vsnprintf_s,该符号在函数 _vsnprintf_s_l 中被引用
  14. 【Redis学习之七】Redis持久化
  15. 性能分析之– JAVA Thread Dump 分析
  16. mysql恢复备份错误:Got a packet bigger than 'max_allowed_packet' bytes
  17. lock,Monitor,Mutex的区别
  18. Spring IOC容器的初始化-(三)BeanDefinition的注册
  19. docker run、commit报错
  20. poj 1655 树的重心 && define注意事项

热门文章

  1. RT-Thread RTOS
  2. python json ajax django四星聚会
  3. 【转】Pro Android学习笔记(三):了解Android资源(上)
  4. 阿里云 centos7.2 云安装mysql
  5. SQL Server等待事件新解
  6. JAVA企业级开发-jdbc事务,数据库连接池(10)
  7. C++11之lambda表达式解析
  8. vs2013代码模板设置
  9. Spring Security认证提供程序
  10. 洛谷P1313 计算系数