Tue Sep 20 2022

Stunning Animated Scroll Down Arrow with HTML and CSS

CSS4338 views

Stunning Animated Scroll Down Arrow with HTML and CSS

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

        body { background-color: #292929; }

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

        ul#downArrow {
            position: relative;
            width: 40px;
            display: flex;
            align-items: center;
            flex-flow: column;
        }

        ul#downArrow li {
            list-style: none;
            width: 8px;
            height: 8px;
            background-color: #fff;
            border-radius: 100%;
            margin-bottom: 10px;
            animation: ani 0.8s infinite ease-in-out;
            animation-delay: calc(0.2s * var(--i));
        }

        ul#downArrow::before,
        ul#downArrow::after {
            position: absolute;
            content: '';
            background-color: #fff;
            width: 30px;
            height: 3px;
            bottom: 0;
        }

        ul#downArrow::before {
            right: 0;
            transform: rotate(-45deg);
            transform-origin: center right;
        }

        ul#downArrow::after {
            left: 0;
            transform: rotate(45deg);
            transform-origin: center left;
        }

        @keyframes ani {
            0% {
                opacity: 0;
                transform: scale(0.5) translateY(-5px);
            }

            50% {
                opacity: 1;
                transform: scale(1) translateY(20px);
            }

            100% {
                opacity: 0;
                transform: scale(0.5) translateY(40px);
            }
            
        }
    </style>
</head>
<body>
    <section>
        <ul id="downArrow">
            <li style="--i:1"></li>
            <li style="--i:2"></li>
            <li style="--i:3"></li>
        </ul>
    </section>
</body>
</html>

Result Screenshot(s)

Stunning Animated Scroll Down Arrow with HTML and CSSWorking 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.