Button 3D Hover Effect

<!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>3D hover effect on button</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=Montserrat&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            font-family: 'Montserrat', sans-serif;
        }

        body {
            background-color: #383838;
        }

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

        a {
            color: #fff;
            text-decoration: none;
            font-size: 40px;
            padding: 8px 20px;
            border: #fff solid thin;
            border-radius: 2px;
            position: relative;
            font-weight: bold;
        }

        a::after {
            content: attr(data-name);
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            opacity: 0;
            padding: 8px 0;
            text-align: center;
            background-color: #fff;
            border-radius: 2px;
            border: #fff solid thin;
            color: #282828;
            transform: perspective(100px) translateY(50%) rotateX(90deg);
            transition: 0.3s all ease;
        }

        a:hover::after {
            opacity: 1;
            transform: translateY(0) rotateX(0deg);
        }
    </style>
</head>
<body>
    <section>
        <a href="" data-name="Hi Geek!">Hover Me!</a>
    </section>
</body>
</html>
                                Copy Code
                            

Result Screenshot(s)

Button 3D Hover EffectWorking Sample0