You are currently viewing Loading Animation Using CSS
Loading Animation Using CSS

Loading Animation Using CSS

Create Website loading effect animation with the help of HTML and CSS.

HTML:

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

    <div class="loading">
        <span>L</span>
        <span>O</span>
        <span>A</span>
        <span>D</span>
        <span>I</span>
        <span>N</span>
        <span>G</span>
        <span>.</span>
        <span>.</span>
        <span>.</span>
       
    </div>
    
</body>
</html>

Now lets Jump into CSS part where all the magic happen

CSS :

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
  }

body{
    background: #000;
    color: rgb(0, 255, 133);
    
}

.loading{
    width: fit-content;
    margin: 22% auto 0;
   overflow: hidden;
   
}

.loading span{
    display: inline-block;
    padding: 2px;
    font-size: 50px;
    font-weight: 600;
    transform: translateY(70px);
    animation: moveup 2s linear infinite;
    background: -webkit-linear-gradient(rgb(0, 255, 133), rgb(212, 202, 4));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
}

@keyframes moveup {
    0%{
        transform: translateY(70px);
    }
    20%{
        transform: translateY(0px);
    }
   100%{
        transform: translateY(0px);
    }
}

.loading span:nth-child(2){
    animation-delay: 0.2s;
}
.loading span:nth-child(3){
    animation-delay: 0.4s;
}
.loading span:nth-child(4){
    animation-delay: 0.6s;
}
.loading span:nth-child(5){
    animation-delay: 0.8s;
}
.loading span:nth-child(6){
    animation-delay: 1s;
}
.loading span:nth-child(7){
    animation-delay: 1.2s;
}
.loading span:nth-child(8){
    animation-delay: 1.4s;
}
.loading span:nth-child(9){
    animation-delay: 1.6s;
}
.loading span:nth-child(10){
    animation-delay: 1.8s;
}

Output:

Loading Animation Using CSS
Loading Animation Using CSS

Conclusion:

We have successfully build this weather application using react js and we have used many technologies in it . To build this react js weather application . i hope you will love this tutorial get so many knowledge from this video. I’m hoping you’ll create this application effectively and get a lot of knowledge from it. We designed this project as a beginner project, but in the future days we will cover more advanced projects as well.

People are also reading: