Dark CSS

Progress Bar Animation

Facebook
Twitter
WhatsApp

Project Preview

HTml code goes here

				
					<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body> 
    <div class="progress"></div>
</body>
</html>
				
			

CSS code goes here

				
					* {
    padding: 0;
    margin: 0;
    box-sizing: border-box; 
}

html,
body {
    display: grid;
    height: 100%;
    place-items: center;
    background: #e8e8e8;
}

.progress {
    box-shadow: 0 0 0 7px #42a5f5, inset 0 0 0 1px #42a5f5;
    position: relative;
    height: 50px;
    width: 230px;
    border-radius: 8px;
    overflow: hidden;
    animation: rotate_5132 6s linear infinite;
}

.progress:before {
    display: block;
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #42a5f5;
    animation: load_5123 6s linear infinite;
}

@keyframes rotate_5132 {

    0%,
    42% {
        transform: rotate(0deg);
    }

    48%,
    92% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes load_5123 {
    0% {
        width: 0;
    }

    40%,
    50% {
        width: 100%;
    }

    90%,
    100% {
        width: 0;
    }
}