进度条

<!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>
    <style>
      .main{
          position: relative;
         
      }
      .progress{
        position: absolute;
        margin-left: 30px;
        margin-top: 15px;
         460px;
        height: 30px;
        background: black;
        border-radius: 15px;
      }
        .run{
            position: absolute;
            top:0;
            left: 0;
             50%;
            height: 30px;
            background: -webkit-linear-gradient(left bottom,
            red 0%,red 25%,yellow 25%,yellow 50%,
            red 50%,red 75%,yellow 75%,yellow 100%
            );
            border-radius: 30px;
            background-size: 30px 30px;
            animation: loadingMove 1s linear infinite both;
        }
        @keyframes loadingMove {
        0%{
       background-position: 0 0;
         }
        100%{
       background-position: 0 -.3rem;
         }
        }
    </style>
</head>
<body>
    <div class="main">
            <div class="progress">
                    <div class="run"></div>
                 </div>
    </div>
    
</body>
</html>
原文地址:https://www.cnblogs.com/zzzzzzzsy/p/8350010.html