Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html loading

<script type="text/javascript">
alert("LOADING...");
</script>

Your Content Goes here...
Comment

loader for html

<!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">
    <style>
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        font-family: 'Lato', sans-serif;
        font-size: 18px;
        line-height: 1.6;
        background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        min-height: 100vh;
    }

    .main {
        text-align: center;
        width: 90%;
        opacity: 0;
        display: none;
        transition: opacity 0.5s ease-in;
    }

    .main h1 {
        font-size: 40px;
    }

    .main p {
        font-size: 20px;
        color: #333;
    }

    .btn {
        display: inline-block;
        background: purple;
        color: #fff;
        text-decoration: none;
        border: none;
        border-radius: 5px;
        padding: 10px 20px;
        margin-top: 15px;
    }

    .btn:hover {
        opacity: 0.9;
    }
    
    .loader {
        height: 50px;
        transform-origin: bottom center;
        animation: rotate 3s linear infinite;
    }

    .circle {
        display: inline-block;
        background-color: purple;
        height: 40px;
        width: 40px;
        border-radius: 50%;
        transform: scale(0);
        animation: grow 1.5s linear infinite;
        margin: -10px;
    }

    .circle:nth-child(2) {
        background-color: palevioletred;
        animation-delay: 0.75s;
    }

    @keyframes rotate {
        to {
            transform: rotate(360deg);
        }
    }

    @keyframes grow {
        50%{
            transform: scale(1)
        }
    }
    </style>
    <title>CSS Loaders</title>
</head>

<body>
    <!-- Loader1 -->
    <div class="loader">
        <div class="circle"></div>
        <div class="circle"></div>
    </div>
    <script>
        const loader = document.querySelector('.loader')
        const main = document.querySelector('.main')

        function init() {
            setTimeout(() => {
                loader.style.opacity = 0;
                loader.style.display = 'none';

                main.style.display = 'block';
                setTimeout(() => (main.style.opacity = 1), 25);
            }, 4000);
        }

        init();
    </script>
</body>

</html>
Comment

loading page html

<style>
.loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #3498db;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}


@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

Comment

PREVIOUS NEXT
Code Example
Html :: how to make a sign up page in html 
Html :: html add line break in string on screen size 
Html :: html input type year 
Html :: textarea with border qml 
Html :: Using SVG as an <img 
Html :: what is radio button in html used for 
Html :: how to write < in html 
Html :: create a close x button in html 
Html :: how to write h1 tag in html 
Html :: vmware workstation ubuntu 16.04 
Html :: bell bootstrap 
Html :: Table row indexing 
Html :: shortcut to open vscode html page in chrome 
Html :: dropbox embed 
Html :: how to write bangladeshi phone number in html 
Html :: angular variable in html 
Html :: django html 3.2.4 background image not working 
Html :: razor syntax autosum based on values 
Html :: how to create warranty page on a web page using html 
Html :: nuxt print html 
Html :: bokeh save html file to directory 
Html :: how to make a scroll horizontally button in html 
Html :: wire:click with value 
Html :: create drop down menu in html 
Html :: html not showing image with full path 
Html :: prompt for confirm before link click 
Html :: html tag convert to d3.select() point 
Html :: html webcam filter effects 
Html :: chrome devtools filter exclude 
Html :: HTML JWB3 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =