Loader

Home / Web Code Snippet / Loader

Loader


https://youtube.com/shorts/E9w4_eM58s0?si=a9UCKqXxo1BvaB33

HTML CODE:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
</head>
<body>
<div class="contianer">
    <span style="--i:1"></span>
    <span style="--i:2"></span>
    <span style="--i:3"></span>
    <span style="--i:4"></span>
    <span style="--i:5"></span>
    <span style="--i:6"></span>
    <span style="--i:7"></span>
    <span style="--i:8"></span>
    <span style="--i:9"></span>
    <span style="--i:10"></span>
</div>
</body>
</html>

CSS CODE:-

      body{
            padding: 0px;
            margin: 0px;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background: black;
        }
        .container{
            position: relative;
            transform: rotateX(60deg);
        }
        span{
            display: block;
            width: 170px;
            height:5px;
            margin-top: 10px;
            border-left: 6px solid cyan;
            border-right: 6px solid cyan;
            border-top: 3px dotted white;
            animation: animate 5s linear infinite;
            animation-delay: calc(var(--i)*0.2s);
        }
        @keyframes animate{
            0%{
                transform: rotateY(0deg);
            }
            100%{
                transform: rotateY(360deg);
            }
        }