pre loading anmation code using html & css code

 Awesome Loading Animation Using Only HTML & CSS



➧copy this code and make a amazing animation using html & css

VIDEO COMING SOON 

HTML CODE :-


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




CSS CODE :-



*{
    margin0;
    padding0;
}

.loading-screen{
    width100%;
    height100vh;
    background-color#2e2e2e;
    positionfixed;
    displayflex;
    align-itemscenter;
    justify-contentcenter;
}

.loading{
    width80px;
    displayflex;
    flex-wrapwrap;
    animation: rotate 3s linear infinite;
}

@keyframes rotate{
    to{
        transformrotate(360deg);
    }
}

.loading span{
    width32px;
    height32px;
    background-colorred;
    margin4px;
    animation: scale 1.5s linear infinite;
}

@keyframes scale{
    50%{
        transformscale(1.2);
    }
}

.loading span:nth-child(1){
    border-radius50% 50% 0 50%;
    background-color#e77f67;
    transform-originbottom right;
}

.loading span:nth-child(2){
    border-radius50% 50% 50% 0;
    background-color#778beb;
    transform-originbottom left;
    animation-delay.5s;
}

.loading span:nth-child(3){
    border-radius50% 0 50% 50%;
    background-color#f8a5c2;
    transform-origintop right;
    animation-delay1.5s;
}

.loading span:nth-child(4){
    border-radius0 50% 50% 50%;
    background-color#f5cd79;
    transform-origintop left;
    animation-delay1s;
}


Comments