Wed Oct 05 2022

Loader with Text Shadow

CSS3087 views

File Name: loading-animation-with-text-shadow.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">
    <title>Loading Animation with Text Shadow</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap" rel="stylesheet"> 
    <style>
         * {
            margin: 0;
            padding: 0;
            font-family: 'Source Sans Pro', sans-serif;
        }

        body {
            background-color: #292929;
        }

        section {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        h1 {
            font-size: 100px;
        }

        h1 span {
            color: rgba(255,255,255,0);
            text-shadow: 0 0 15px rgba(255,255,255,0.5);
            animation: loading 3s infinite linear;
            animation-delay: calc(0.3s * var(--i));
        }

        @keyframes loading {
            0%, 100% {
                color: rgba(255,255,255,0);
                text-shadow: 0 0 15px rgba(255,255,255,0.5);
            }

            50% {
                color: rgba(255,255,255,0.9);
                text-shadow: 0 0 15px rgba(255,255,255,0.8);
            }
        }
    </style>
</head>
<body>
    <section>
        <h1>
            <span style="--i:1">L</span>
            <span style="--i:2">O</span>
            <span style="--i:3">A</span>
            <span style="--i:4">D</span>
            <span style="--i:5">I</span>
            <span style="--i:6">N</span>
            <span style="--i:7">G</span>
        </h1>
    </section>
</body>
</html>

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.