Dark CSS

Gradient Loading Circle

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="loader"></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: #212121;
}

.loader {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.loader::before,
.loader::after {
    content: "";
    position: absolute;
    border-radius: inherit;
}

.loader::before {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(0deg, #ff00cc 0%, #333399 100%);
    animation: load012323 .5s infinite linear;
}

.loader::after {
    width: 85%;
    height: 85%;
    background-color: #222;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes load012323 {
    to {
        transform: rotate(360deg);
    }
}