css简易的进度条

<!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>

        .box {

            width: 100%;

            height: 20px;

            border: 1px solid black;

        }

 

        .progress {

            height: 20px;

            width: 100%;

            animation: progressBar 3s linear;

            background-color: palegreen;

        }


 

        @keyframes progressBar {

            from {

                width: 0;

                background-color: palegreen;

            }

 

            to {

                widows: 100%;

                background-color: palegreen;

            }

        }

    </style>

</head>

 

<body>

    

    <div class="box">

            <div class="progress"></div>

    </div>

</body>

 

<html>


版权声明:本文为qq_45723045原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。