Skip to main content

Neon Light Button | 3D Animation Effects On Hover | HTML & CSS




Neon Light Button | 3D Animation Effects On Hover 



 
HTML : 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Neon Button | 3D Animation</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <a href="#">InsaneCodes</a>
</body>
</html>




CSS :
*{
    margin0;
    padding0;
    box-sizing: border-box;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height100vh;
    background#031424;
    font-family: Arial, Helvetica, sans-serif;
}
a{
    position: relative;
    font-size24px;
    padding14px 30px;
    color#4d41ec;
    letter-spacing4px;
    text-decoration: none;
    text-transform: uppercase;
    border1px solid #4d41ec;
    overflow: hidden;
}
a::before{
    content'';
    position: absolute;
    top0;
    left-100%;
    height100%;
    width100%;
    backgroundlinear-gradient(90deg, transparent, #fff , transparent);
}
a:hover::before{
    animation: ani2 1s infinite ease-in-out alternate;
}
@keyframes ani2{
    0%{
        left-100%;
    }
    100%{
        left100%;
    }
}

a:hover{
    border: none;
    color#fff;
    background#4d41ec;
    box-shadow0 0 10px #4d41ec,0 0 20px #4d41ec,0 0 40px #4d41ec;
    animation: ani 1s infinite ease-in-out alternate;
}
@keyframes ani{
    0%{
        transformperspective(500pxrotateY(-15deg);
        text-shadow6px 3px 2px rgba(0000.3);
        
    }
    100%{
        transformperspective(500pxrotateY(15deg);
        text-shadow-6px 3px 2px rgba(0000.3);
    }
}






Comments

Post a Comment