zoukankan      html  css  js  c++  java
  • 动画编写及调用

    //@keyframes定义动画

    //animation-name属性主要是用来调用 @keyframes 定义好的动画。

    //animation-duration主要用来设置CSS3动画播放时间(其使用方法和transition-duration类似),是用来指定元素播放动画所持续的时间长。

    //animation-timing-function属性主要用来设置动画播放方式。(ease、ease-in、ease-out、linear、ease-in-out)

    //animation-delay属性用来定义动画开始播放的时间,用来触发动画播放的时间点。

    //animation-iteration-count属性主要用来定义动画的播放次数。(默认1次,infinite为无限次)

    //animation-direction属性主要用来设置动画播放方向。(normal是默认值,如果设置为normal时,动画的每次循环都是向前播放;alternate,动画播放在第偶数次向前播放,第奇数次向反方向播放。)

    //animation-play-state属性主要用来控制元素动画的播放状态。其主要有两个值:runningpaused

    //animation-fill-mode属性定义在动画开始之前和结束之后发生的操作。主要具有四个属性值:none、forwards、backwordsboth

    @keyframes redToBlue{
      from{
        background: red;
      }
      20%{
          background:green;
      }
      40%{
          background:lime;
      }
      60%{
          background:yellow;
      }
      to{
        background:blue;
      }
    }

    div {
      200px;
      height: 200px;
      background: red;
      margin: 20px auto;
      animation-name:redToBlue;
      animation-duration: 20s;
      animation-timing-function: ease;
      animation-delay: 1s;
      animation-fill-mode: both;
    }

  • 相关阅读:
    redis配置文件redis.conf总结
    react井字棋小游戏实现及优化
    springboot 如何在请求进入controller之前改变body中的值
    记录一个Springboot启动的问题->sprinboot正常启动但是tomcat却没有启动
    websocket-基于springboot的简单实现
    JVM-垃圾回收
    gRPC-Java实践
    Protocol Buffers—-java
    串口通信学习-基础
    Modbus通信协议学习
  • 原文地址:https://www.cnblogs.com/SunnyYYN/p/7418948.html
Copyright © 2011-2022 走看看