zoukankan      html  css  js  c++  java
  • Animations动画和Keyframes关键帧

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <style>
        body {
            display: flex;              /* 使用Flex布局 */
            justify-content: center;    /* 水平居中 */
        }
        .ball {
             100px;
            height: 100px;
            border-radius: 50%;         /* 把正方形变成圆形*/
            background-color: #FF5722;  /* 设置颜色为橙色*/
            animation: bounce 0.5s cubic-bezier(.5,0.05,1,.5);
            animation-direction: alternate;  //alternate(2,4,6)反向动画
            animation-iteration-count: infinite;
        }
        @keyframes bounce {
            from { transform: translate3d(0, 0, 0);     }
            to   { transform: translate3d(0, 200px, 0) rotateX(45deg); }
        }
    </style>
    <body>
    <div class="ball"></div>
    <script>
    </script>
    </body>
    </html>
    

      

  • 相关阅读:
    UVa10779
    UVa10779
    C++ 内存管理学习笔记
    c++ 学习笔记
    AcWing 275 传纸条
    I
    Tree HDU6228
    Lpl and Energy-saving Lamps
    C
    Secret Poems
  • 原文地址:https://www.cnblogs.com/jiebba/p/7602668.html
Copyright © 2011-2022 走看看