Different types of LOADERS creation using HTML and CSS.

 LOADERS CREATION IN HTML and CSS




                                                                We have created different 4 types of

 LOADERS . We have applied different coding techniques  for achieving result. You

 should try this web program once it will yield great knowledge to you.



PROGRAM SOURCE CODE :)

 



1) HTML Coding :- 




<!DOCTYPE html>
<html>
<head>
    <meta name ="viewport" content="width:device-width,initial-scale:1.0">
    <link rel="stylesheet" type="text/css" href="..\CSS\Loader.css"> 
    <title>Loader on Webpage</title>
</head>
<body>
    <h2>Loader - 1</h2>
    <div class="first">
    <div class="loader1"></div>
    </div>
    <h2>Loader - 2</h2>
    <div class="loader2">
        <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>
        <span style="--i:11;"></span>
        <span style="--i:12;"></span>
        <span style="--i:13;"></span>
        <span style="--i:14;"></span>
        <span style="--i:15;"></span>
        <span style="--i:16;"></span>
        <span style="--i:17;"></span>
        <span style="--i:18;"></span>
        <span style="--i:19;"></span>
        <span style="--i:20;"></span>
    </div>
    <h2>Loader - 3</h2>
    <div class="third">
        <div class="loader3"></div> 
        <h3>Loading</h3>
    </div>
    <h2>Loader - 4</h2>
    <div class="third">
        <div class="center-div">
            <span></span>
            <span></span>
            <span></span>
        </div>  
    </div>

    <footer>
        <marquee scrollamount="20"><h1>Thanks for watching!!</h1></marquee>
    </footer>
</body>
</html>





2) CSS Coding :- 



*{
    margin:0px;
    padding0px;
    box-sizingborder-box;
}
html{
    font-size62.5%;
}
body{
    overflow-xhidden
}
marquee h1{
    font-family: vernda;
    font-size4rem;
    letter-spacing.2rem;
    padding3rem;
    colorred;
}

/* <-------Loader -1 Styling Start--------->*/

h2{
    width100vw;
    font-family:Georgia;
    font-weight900;
    letter-spacing.2rem;
    text-transformuppercase;
    font-size3rem;
    text-align:center;
    color:#fff;
    background-color#011;
    padding2rem;
}
.first{
    width100vw;
    height:40rem;
    displayflex;
    justify-contentcenter;
    align-itemscenter;
}
.loader1{
    width20rem;
    height20rem;
    border:2.5rem solid #fff;
    border-left:2.5rem solid blue
    border-top2.5rem solid blue;
    border-right2.5rem solid blue;
    border-radius50%;
    animation: f 0.7s linear infinite;
}
@keyframes f{
    from{
        transformrotate(0deg);
    }
    to{
        transformrotate(360deg);
    }
}

/* <---------Loader -1 Styling End--------> */




/* <-------Loader -2 Styling Start-------> */

.loader2{
    width100vw;
    height60rem;
    margin:5rem 0rem 10rem 0rem;
    positionrelative;
    animation: h 2s linear infinite;
    background#000;
}
@keyframes h{
    from{
        filterhue-rotate(0deg);
    }
    to{
        filterhue-rotate(360deg);
    }
}
.loader2 span{
    width10%;
    height10%;
    positionabsolute;
    top30rem;
    left:55rem;
    transformrotate(calc(18deg * var(--i)));
}
.loader2 span::before{
    content" ";
    width1rem;
    height1rem;
    positionabsolute;
    top10rem;
    left:20rem;
    background-color#4cd137;
    border-radius50%;
    box-shadow0 0 1rem #4cd1370 0 2rem #4cd137
0 0 4rem #4cd1370 0 6rem #4cd137
0 0 8rem #4cd1370 0 10rem #4cd137;
    animation: rot 2s linear infinite;
    animation-delaycalc(0.1s * var(--i));
}
@keyframes rot{
    0%{
        transformscale(1);
    }
    80%,100%{
        transformscale(0);
    }
}

/* <---------Loader - 2 Styling End----------> */


/*<-------Loader - 3 Styling Start---------> */

.third{
    width100vw;
    height:60rem;
    displayflex;
    justify-contentcenter;
    align-itemscenter;
    background#000;
    margin:  5rem 0rem 10rem 0rem;
    positionrelative;
}
.loader3{
    width30rem;
    height30rem;
    border-radius50%;
    border-left:1rem solid #fff;
    animation: r 1s linear infinite;
}
.third h3{
    color#fff;
    font-familycursive;
    font-size3.5rem;
    letter-spacing.2rem;
    z-index1000;
    positionabsolute;
    top50%;
    left50%;
    transformtranslate(-50%,-50%);
}
@keyframes r{
    from{transformrotate(0deg);}
    to{transformrotate(360deg);}
}

/* <-------Loader - 3 Styling End-------> */


/* <-------Loader -4 Styling Start-------->*/

.center-div
{
    width25rem;
    height25rem;
    positionrelative;
}

.center-div span{

    width7rem;
    height7rem;
    positionabsolute;
    background-color#ff0000;
    animation: roll 3s linear infinite;
}

@keyframes roll{

    0%{
        top0%;
        left0%;
    }

    12.5%{
        top:0%;
        left50%;
    }

    25%{
        top:0%;
        left50%;
    }

    37.5%{
        top50%;
        left50%;
    }

    50%{
        top50%;
        left50%;
    }

    62.5%{
        top50%;
        left0%;
    }

    75%{
        top50%;
        left0%
    }

    87.5%{
        top0%;
        left0%;
    }

    100%{
        top0%;
        left0%;
    }
}

.center-div span:nth-child(2){
    animation-delay1s;
    background-color:  #FFD700 ;
}

.center-div span:nth-child(3){
    animation-delay:2s;
    background-color:  #0000FF ;
}


/*<------Loader - 3 Styling End -------->*/




OUTPUT :- 








( NOTE : - While executing program you have to replace links of images , audio's  or video's in this program by your links. So take care of it ! )