Mon May 16 2022

Text Glowing Animation

CSS5490 views

Text Glowing Animation

File Name: Text-Glowing-Animation.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>Text Glowing Animation</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=Kanit:wght@700&display=swap" rel="stylesheet"> 
    <style>
        * {
            margin: 0;
            padding: 0;
            font-family: 'Kanit', sans-serif;
        }

        body {
            background-color: #383838;
        }

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

        ul {
            display: flex;
            list-style: none;
        }

        ul li {
            font-size: 80px;
            color: #1d1d1d;
            font-weight: bold;
            margin: 0 2px;
            animation: neonTxt 5s ease-in-out infinite alternate;
        }

        ul li:nth-child(2) { animation-delay: 1s; }
        ul li:nth-child(3) { animation-delay: 2s; }
        ul li:nth-child(4) { animation-delay: 3s; }
        ul li:nth-child(5) { animation-delay: 4s; }
        ul li:nth-child(6) { animation-delay: 5s; }
        ul li:nth-child(7) { animation-delay: 6s; }
        ul li:nth-child(8) { animation-delay: 7s; }
        ul li:nth-child(9) { animation-delay: 8s; }

        @keyframes neonTxt {
            0%, 5% {
                color: #47cf73;
                text-shadow: 0 0 8px #47cf73;
            }

            20%, 100% {
                color: #1d1d1d;
            }

            30%, 100% {
                text-shadow: none;
            }
        }

    </style>
</head>
<body>
    <section>
        <ul>
            <li>G</li>
            <li>e</li>
            <li>e</li>
            <li>k</li>
            <li>b</li>
            <li>o</li>
            <li>o</li>
            <li>t</li>
            <li>s</li>
        </ul>
    </section>
</body>
</html>

Result Screenshot(s)

Text Glowing AnimationWorking Sample0

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