HTMLify

battery.html
Views: 189 | Author: dakshbadal1379
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .batt_top{
            height: 2rem;
            width: 10rem;
            font-weight: 300;
            border: 4px solid black;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
            margin: 0 auto;
        }
        .battecontain{
            height: 25rem;
            width: 20rem;
            /* font-weight: 300; */
            border: 4px solid black;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
            position: relative;
            margin: 0 auto;
            

        }
        .content{
            width: 100%;
            
            bottom: 0;
            /* z-index: -1; */
            overflow-x: hidden;
            animation: fill 6s linear infinite ;
            /* background-color: red; */
        }
        @keyframes fill {
            0%{
                height: 0%;
                background-color: red;
            }
            20%{
                height: 20%;
                background-color: rgb(243, 196, 67);
            }
            50%{
                height: 50%;
                background-color: yellow;
            }
            80%{
                height: 80%;
                background-color: greenyellow;
            }
            100%{
                
                height: 100%;
                background-color: rgb(13, 235, 13);
            }
            
        }




    
    </style>
</head>
<body>
    <div class="batt_top"></div>
    <div class="battecontain">
        <div class="content"></div>
    </div>
</body>
</html>

Comments