<!-- --------------- Created By InCoder --------------- -->
<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>Amazing Glowing Buttons - InCoder</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<button class="inBtn inBtn-glow-one">Submit</button>
<button class="inBtn inBtn-glow-two">Submit</button>
</body>
</html>
/* --------------- Created By InCoder --------------- */
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #202020;
}
.inBtn {
border: 0px;
color: #fff;
margin: 0.5rem;
font-size: 16px;
cursor: pointer;
padding: 8px 20px;
position: relative;
border-radius: 50px;
}
.inBtn-glow-one {
background: linear-gradient(
90deg,
#2fd79f,
#2f89d7,
#2f89d7,
#2fd79f,
#2fd79f
);
background-size: 400%;
}
.inBtn-glow-two {
background: linear-gradient(
90deg,
#d42cc9,
#ad24a4,
#bd2a31,
#d73e2f,
#d42cc9
);
background-size: 400%;
}
.inBtn::before {
content: "";
position: absolute;
top: -5px;
right: -5px;
left: -5px;
bottom: -5px;
background: inherit;
filter: blur(8px);
border-radius: 50px;
transition: opacity 0.4s;
opacity: 0;
}
.inBtn:hover::before {
opacity: 1;
z-index: -1;
}
button:hover {
z-index: 1;
animation: buttonFilter 8s linear infinite;
}
@keyframes buttonFilter {
0% {
background-position: 0%;
}
100% {
background-position: 400%;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.