Custom Web Loader Animations | FreeProjects1

BHOLU SINGH
0

 Creating Custom Web Loader Animations with HTML and CSS

Web loaders are a common feature of many websites and applications, providing visual feedback to users while content is loaded in the background. While many pre-made loader animations are available online, creating custom animations using HTML and CSS can help your website stand out and provide a unique user experience. In this post, we'll go through the process of creating custom web loader animations using HTML and CSS.

If you want to get free source code then scroll down the post.

Image Loading error | FreeProjects1


Step 1: Design the Loader Container

The first step is to create a container for the loader animation. This can be a div or another HTML element, and it should be positioned where you want the loader to appear on your page. Use CSS to style your container element, setting the width, height, background color, and any other properties you want. You can also add a border-radius to make the container look round.


Step 2: Create the Animation

Next, create the actual animation using CSS keyframes. Keyframes allow you to define how your animation should look at different points in time. For example, start with the container at 0% opacity and gradually increase it to 100% over a few seconds. You can also use transform and transition properties to create more complex animations, such as spinning circles or bouncing balls.


Step 3: Apply the Animation

Apply the animation to your container element using the animation property in CSS. You'll need to specify the name of the keyframe animation you created, as well as the duration, timing function, and any other options you want to use. You can also use animation-delay to stagger multiple loader animations on the same page.


Step 4: Add Text or Elements

Finally, add some text or other elements to your container to give users a sense of what's happening while the loader animation runs. For example, you might include a message like "Loading..." or "Please wait while we process your request." You can use CSS to style the text and position it within the container.


Here is an example of how you could create a custom web loader:

Here is an example of HTML for a custom web loader:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Custom Web Loader | FreeProjects1</title>
    <link rel="shortcut icon" href="favicon.png" type="image/x-icon">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <div class="loader1"></div>
        <div class="loader2"></div>
        <div class="loader3"></div>
        <div class="loader4"></div>
        <div class="loader5">
            <div></div>
            <div></div>
            <div></div>
            <span>L</span>
        </div>
    </div>
</body>
</html>


Here is an example of CSS for a custom web loader:

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(45deg, #111, #555);
}
.container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3em;
    padding: 2em;
}

/* Loader 1 | Rotate Loader */
.loader1{
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border-top: 8px solid rgba(255, 255, 255, 1);
    border-left: 8px solid rgba(255, 255, 255, 1);
    border-right: 8px solid rgba(255, 255, 255, 0);
    animation: spin 0.575s infinite linear;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}




/* Loader 2 | Pulse Loader */
.loader2{
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 0.85s infinite linear;
}
@keyframes pulse {
    0%{
        transform: scale(0.15);
        opacity: 0;
    }
    50%{
        opacity: 1;
    }
    100%{
        transform: scale(1);
        opacity: 0;
    }  
}




/* Loader 3 | Clock Loader */
.loader3{
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #f9f9f9;
}
.loader3::after{
    content: '';
    position: absolute;
    bottom: 29px;
    left: 30px;
    display: block;
    transform-origin: 0% 100%;
    width: 1px;
    height: 24px;
    background: #f9f9f9;
    animation: tick 1s infinite linear;
}
@keyframes tick {
    to{
        transform: rotate(359deg);
    }
}


/* Loader 4 | Glass Loader */
.loader4{
    transform: perspective(140px) rotateX(-45deg);
    width: 32px;
    height: 72px;
    position: relative;
    border: 2px solid #fff;
    animation: load 1.5s infinite linear alternate;
}
@keyframes load {
    0%{
        box-shadow: 0 0 #ed3b65 inset;
    }
    100%{
        box-shadow: 0 -70px #ed3b65 inset;
    }
}



/* Loader 5 | Heart in circle Loader */
.loader5{
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 2px 2px rgba(36, 108, 36, 0.847);
    animation: rotate 3s infinite linear;
    user-select: none;
}
.loader5 div{
    position: absolute;
    width: 95%;
    height: 28%;
    border-radius: 100%;
}
.loader5 div:nth-child(1){
    transform: rotate(0deg);
    border-top: 2px solid rgb(16, 213, 16);
    border-left: 2px solid rgb(16, 213, 16);
    border-right: 2px solid rgb(16, 213, 16);
}
.loader5 div:nth-child(2){
    transform: rotate(60deg);
    border-left: 2px solid rgb(16, 213, 16);
    border-right: 2px solid rgb(16, 213, 16);
    border-bottom: 2px solid rgb(16, 213, 16);
}
.loader5 div:nth-child(3){
    transform: rotate(120deg);
    border-left: 2px solid rgb(16, 213, 16);
    border-right: 2px solid rgb(16, 213, 16);
    border-top: 2px solid rgb(16, 213, 16);
}
@keyframes rotate{
    to{
        transform: rotate(360deg);
    }
}
.loader5 span{
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: .5px solid rgb(16, 213, 16);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: .8em;
    color: rgb(16, 213, 16);
    animation: rotateReverse 3s infinite linear;
}
@keyframes rotateReverse{
    to{
        transform: rotate(-360deg);
    }
}



Conclusion

Creating custom web loader animations with HTML and CSS can help your website stand out and provide a unique user experience. By designing the loader container, creating the animation, applying it, and adding text or elements, you can create a loader animation that fits your website's style and branding. Remember to test your loader animation on different devices and browsers to ensure it works properly for all users.



Download the source code of this project-

   




HTML, CSS, Web design, Loader animation, Spinner, Preloader, Loading screen, Keyframes, Animation properties, Web development, Front-end development, UI design, User experience, Visual interest, Spinning circles, Pulse Loader, Clock Loader, Pulse Loader, Heart in Circle Loader, Web elements.

Post a Comment

0Comments

Please do not enter any spam link in the comment box.

Post a Comment (0)