Thu Apr 28 2022

Text Gradient Effect

CSS4691 views

File Name: text-gradient-effect.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>Gradient Text</title>

    <style>
        body {
            background-color: #383838;
        }

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

        h1 {
            font-size: 80px;
            background-image: linear-gradient(-45deg,
                                #ff1111,
                                #ffe604,
                                #6cff09,
                                #03ffea,
                                #ff12ff);
            background-position: 0 0;
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            background-size: 200%;
        }

        h1:hover{
            animation: changeColor 5s linear infinite;
        }

        @keyframes changeColor {
            0% {
                background-position: 0 0;
            }

            50% {
                background-position: 400% 0;
            }

            100% {
                background-position: 0 0;
            }
        }
    </style>
</head>
<body>
    <section>
        <h1>Geekboots</h1>
    </section>
</body>
</html>

Result Screenshot(s)

Text Gradient EffectWorking 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.