zoukankan      html  css  js  c++  java
  • CSS3特效(3)——环形进度条

    环形进度条

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .circleProgress_wrapper{
                 200px;
                height: 200px;
                margin: 50px auto;
                position: relative;
                border:1px solid #ddd;
            }
    
            .wrapper{
                 100px;
                height: 200px;
                position: absolute;
                top:0;
                overflow: hidden;
            }
            .right{
                right:0;
            }
            .left{
                left:0;
            }
            .circleProgress{
                 160px;
                height: 160px;
                border:20px solid rgb(232, 232, 12);
                border-radius: 50%;
                position: absolute;
                top:0;
                -webkit-transform: rotate(45deg);
            }
            .rightcircle{
                border-top:20px solid green;
                border-right:20px solid green;
                right:0;
                -webkit-animation: circleProgressLoad_right 5s linear infinite;
            }
            .leftcircle{
                border-bottom:20px solid green;
                border-left:20px solid green;
                left:0;
                -webkit-animation: circleProgressLoad_left 5s linear infinite;
            }
            @-webkit-keyframes circleProgressLoad_right{
                0%{
                    border-top:20px solid #ED1A1A;
                    border-right:20px solid #ED1A1A;
                    -webkit-transform: rotate(45deg);
                }
                50%{
                    border-top:20px solid rgb(232, 232, 12);
                    border-right:20px solid rgb(232, 232, 12);
                    border-left:20px solid rgb(81, 197, 81);
                    border-bottom:20px solid rgb(81, 197, 81);
                    -webkit-transform: rotate(225deg);
                }
                100%{
                    border-left:20px solid green;
                    border-bottom:20px solid green;
                    -webkit-transform: rotate(225deg);
                }
            }
            @-webkit-keyframes circleProgressLoad_left{
                0%{
                    border-bottom:20px solid #ED1A1A;
                    border-left:20px solid #ED1A1A;
                    -webkit-transform: rotate(45deg);
                }
                50%{
                    border-bottom:20px solid rgb(232, 232, 12);
                    border-left:20px solid rgb(232, 232, 12);
                    border-top:20px solid rgb(81, 197, 81);
                    border-right:20px solid rgb(81, 197, 81);
                    -webkit-transform: rotate(45deg);
                }
                100%{
                    border-top:20px solid green;
                    border-right:20px solid green;
                    border-bottom:20px solid green;
                    border-left:20px solid green;
                    -webkit-transform: rotate(225deg);
                }
            }
        </style>
    </head>
    <body>
    <div class="circleProgress_wrapper">
        <div class="wrapper right">
            <div class="circleProgress rightcircle"></div>
        </div>
        <div class="wrapper left">
            <div class="circleProgress leftcircle"></div>
        </div>
    </div>
    </body>
    </html>
    
  • 相关阅读:
    [译]ECMAScript 6中的方法定义
    perlrequick中文版
    JavaScript:实例讲解使用ES6中默认参数和剩余参数时的注意事项
    [译]JavaScript引擎中的自动函数内联
    [译]Javascript:Harmony(ECMAScript规范)制定流程
    [译]通过学习其他语言来学习JavaScript
    [译]WebKit中的CSS预加载扫描器
    JavaScript:正则表达式的/y标识
    [译]CSS没有类
    [译]ES6:数组推导式和生成器推导式
  • 原文地址:https://www.cnblogs.com/janas-luo/p/9605587.html
Copyright © 2011-2022 走看看