zoukankan      html  css  js  c++  java
  • CSS3 动画--- CSS3 animation

    动画是CSS3中具有颠覆性的特征之一,可通过设置多个节点来精确控制一个或一组动画,常用来实现复杂的动画效果。

    语法格式:

    animation:动画名称 花费时间 运动曲线  何时开始  播放次数  是否反方向;

    关于几个值,除了名字,动画时间,延时有严格顺序要求其它随意r

    @keyframes 动画名称 {
      from{ 开始位置 }  0%
      to{  结束  }  100%
    }
    animation-iteration-count:infinite;  无限循环播放    默认是1次
    animation-direction: alternate   动画应该轮流反向播放    默认是 normal
    animation-play-state:paused;   暂停动画"

    小汽车案例

    body {
      background: white;
    }
    img {
      width: 200px;
    }
    .animation {
      animation-name: goback;
      animation-duration: 5s;
      animation-timing-function: ease;
      animation-iteration-count: infinite;
    }
    @keyframes goback {
      0%{}
      49%{
        transform: translateX(1000px);
      }
      55%{
        transform: translateX(1000px) rotateY(180deg);
      }
      95%{
        transform: translateX(0) rotateY(180deg);
      }
      100%{
        transform: translateX(0) rotateY(0deg);
      }
    }
  • 相关阅读:
    Codeforces Round #456 (Div. 2)
    Codeforces Round #455 (Div. 2)
    Codeforces Round #453 (Div. 1)
    Codeforces Round #450 (Div. 2)
    退役了
    退役了
    这个博客不想要了
    Hello!The familiar and strange world.
    真正的退役了。
    bzoj4231: 回忆树
  • 原文地址:https://www.cnblogs.com/jane-panyiyun/p/11865775.html
Copyright © 2011-2022 走看看