Mon Oct 10 2022

Scroll Down Button

CSS3284 views

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

        body {
            background-color: #292929;
        }

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

        .scrollBtn {
            width: 40px;
            height: 60px;
            border-radius: 20px;
            border: #fff solid 2px;
            position: relative;
        }

        .scrollBtn::before {
            position: absolute;
            content: '';
            width: 20px;
            height: 2px;
            background-color: #fff;
            left: 3px;
            top: 50%;
            transform: translateY(-50%) rotate(45deg);
            transition: 0.3s all ease;
        }

        .scrollBtn::after {
            position: absolute;
            content: '';
            width: 20px;
            height: 2px;
            background-color: #fff;
            right: 3px;
            top: 50%;
            transform: translateY(-50%) rotate(-45deg);
            transition: 0.3s all ease;
        }

        .scrollBtn:hover::before {
            transform: translateY(-50%) rotate(-45deg);
        }

        .scrollBtn:hover::after {
            transform: translateY(-50%) rotate(45deg);
        }

    </style>
</head>
<body>
    <section>
        <a href="" class="scrollBtn"></a>
    </section>
</body>
</html>

Result Screenshot(s)

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