Thu Aug 18 2022

Scroll Down Indicator

CSS4701 views


Scroll Down Indicator

File Name: scroll-down-indicator.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>Scroll Down Indicator</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #292929;
        }

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

        .scrollDown {
            width: 45px;
            height: 70px;
            border: #fff solid 2px;
            border-radius: 30px;
            display: flex;
            justify-content: center;
        }

        .scrollDown span {
            background-color: #fff;
            width: 5px;
            height: 10px;
            border-radius: 30px;
            margin-top: 10px;
            position: relative;
        }

        .scrollDown span::before {
            position: absolute;
            content: '';
            width: 15px;
            height: 15px;
            border: none;
            border-right: 2px solid #fff;
            border-top: 2px solid #fff;
            transform: translateY(-10px) rotate(135deg);
            left: -6px;
            margin-top: 10px;
            opacity: 0;
            animation: ani 1.8s infinite linear;
        }


        .scrollDown span::after {
            position: absolute;
            content: '';
            width: 15px;
            height: 15px;
            border: none;
            border-right: 2px solid #fff;
            border-top: 2px solid #fff;
            transform: translateY(-10px) rotate(135deg);
            left: -6px;
            margin-top: 10px;
            opacity: 0;

            animation: ani 1.8s infinite linear;
            animation-delay: 0.8s;
        }

        @keyframes ani {
            0% {
                margin-top: 10px;
                opacity: 0;
            }

            50% {
                margin-top: 25px;
                opacity: 1;
            }

            100% {
                margin-top: 40px;
                opacity: 0;
            }
        }
        
    </style>
</head>
<body>
    <section>
        <a href="" class="scrollDown">
            <span></span>
        </a>
    </section>
</body>
</html>

Result Screenshot(s)

Scroll Down IndicatorWorking 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.