zoukankan      html  css  js  c++  java
  • animation动画案例

    最近一直苦恼做一个banner的进度条,原先用js改变width值,但明显卡顿。后来用了animation,超级好用。

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
    </head>
    <style>
        .rotation {
            animation: rotation 8s linear;
             50px;
            background:red;
            height:2px;
        }
    
        @keyframes rotation {
            0% {
                transform: translateX(0) ;
            }
            100% {
                transform: translateX(50px) ;
            }
        }
    </style>
    <body>
    <div class="rotation">
        
    </div>
    </body>
    
    </html>
  • 相关阅读:
    柱状图最大的矩形
    单词搜索
    最小覆盖子串
    颜色分类
    编辑距离
    X的平方根
    二进制求和
    最大子序和
    N皇后
    java8-14-时间API
  • 原文地址:https://www.cnblogs.com/kaiqinzhang/p/10450046.html
Copyright © 2011-2022 走看看