zoukankan      html  css  js  c++  java
  • css复杂动画(animation属性)

    1、声明:@keyframes name{   };

    2、涉及到的属性

    animation-name:动画名称

    animation-duration:单次动画总时长

    animation-timing-function:时间函数

    animation-delay:播放前延时的时长

    animation-iteration-count:播放次数  (特殊值:infinite 循环播放)

    animation-direction:播放顺序(normal:正常播放  alternate:轮流反向播放)

    3、简写animation: name duration timing-function delay iteration-count direction fill-mode;

    4、例子:

        <style>
            @keyframes cart {
                from {
                    left: 0;
                    top: 0;
                    border-radius: 0;
                }
                20% {
                    left: 200px;
                    top: 500px;
                    transform: rotateZ(720deg);
                }
                40% {
                    left: 400px;
                    top: 0;
                    border-radius: 50px;
                }
                60% {
                    top: 500px;
                    left: 600px;
                    border-radius: 50%;
                }
                80% {
                    top: 0px;
                    left: 800px;
                    border-radius: 50px;
                }
                to {
                    left: 0;
                    top: 0;
                }
            }
            
            .Z {
                height: 150px;
                width: 150px;
                position: relative;
                background-color: blue;
                animation: cart 10s linear 2s infinite alternate;
                transition: all 2s;
            }
            
           
        </style>
    </head>
    
    <body>
        <div class="Z">
    
        </div>

    得到的效果:

  • 相关阅读:
    各种有趣vbs,bat脚本
    weblogic ssrf 漏洞笔记
    jboss反序列化漏洞实战渗透笔记
    脏牛提权
    Bugku-cms1
    通过Tomcat Manager拿shell
    【转】网站渗透入侵常见谷歌黑客语法总结
    【转】AWVS扫描小技巧
    学习笔记
    三栏布局那些事儿
  • 原文地址:https://www.cnblogs.com/Taiweis/p/11606479.html
Copyright © 2011-2022 走看看