adc

clicks

gradient loader animation effect using html and css

 

Hello readers, Today in this blog you’ll learn how to create an Animated Gradient Shiny Loader or Preloader in HTML CSS. Earlier I have shared a Color Changing Shiny Loader using HTML & CSS only Now it’s time to create an Animated Gradient Loader with Percentage Html and CSS.

Preloaders are something you try on the screen while the rest of the page’s content is still stuffing. Preloaders or loaders are often easy or complicated animations that are used to keep callers entertained while server ideas finish processing.

At first, this loader is in the initial stage, where there is a loader and 0% text or number at the center on the webpage. But when you click on that center text or number, the loader will be activated and it starts to rotates as well as the center percentage also starts to increase from 0% to 100%. When it completed 100%, the loader finishes rotating.

 



Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.

After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.

 

Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.

<!DOCTYPE html>
<html>
<head>
    <title>loader animation</title>

    <style type="text/css">
        
        *{
            margin: 0;
            padding: 0;
        }
        body{
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background:#b9c2d9;
        }
        .loader{
            position: relative;
            width: 200px;
            height: 200px;
            overflow: hidden;
            border-radius: 50%;



        }
        .loader:before{
            content: "";
            position: absolute;
            width: 175px;
            height: 175px;
            background:#b9c2d9;
            border-radius:50%;
            z-index: 10;
            justify-content: center;
            align-items: center;
        }
        .loader span{
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: -1;
            border-radius: 50%;
            background:linear-gradient(#00008b, #006400, #ff0000);
            filter: blur(20px);
            animation: animate 0.8s linear infinite;
        }
        @keyframes animate{
            0%{
                transform: rotate(0deg);
            }

            100%{
                transform: rotate(360deg);
            }
        }


        

    </style>
</head>
<body>

    <div class="loader">
        <span></span>
        <span></span>
    </div>

</body>
</html>

 

Watch Videos

 

 More Videos

 


gradient loader animation effect using html and css gradient loader animation effect using html and css Reviewed by easycoding on August 16, 2020 Rating: 5

No comments:

Powered by Blogger.