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 :
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #031424;
font-family: Arial, Helvetica, sans-serif;
}
a{
position: relative;
font-size: 24px;
padding: 14px 30px;
color: #4d41ec;
letter-spacing: 4px;
text-decoration: none;
text-transform: uppercase;
border: 1px solid #4d41ec;
overflow: hidden;
}
a::before{
content: '';
position: absolute;
top: 0;
left: -100%;
height: 100%;
width: 100%;
background: linear-gradient(90deg, transparent, #fff , transparent);
}
a:hover::before{
animation: ani2 1s infinite ease-in-out alternate;
}
@keyframes ani2{
0%{
left: -100%;
}
100%{
left: 100%;
}
}
a:hover{
border: none;
color: #fff;
background: #4d41ec;
box-shadow: 0 0 10px #4d41ec,0 0 20px #4d41ec,0 0 40px #4d41ec;
animation: ani 1s infinite ease-in-out alternate;
}
@keyframes ani{
0%{
transform: perspective(500px) rotateY(-15deg);
text-shadow: 6px 3px 2px rgba(0, 0, 0, 0.3);
}
100%{
transform: perspective(500px) rotateY(15deg);
text-shadow: -6px 3px 2px rgba(0, 0, 0, 0.3);
}
}
nice work....
ReplyDeleteThank u🙂
DeleteGjb bhai pehchane
ReplyDeleteyes!!
Deletebro good keep it up
ReplyDelete