🌐 Modern Glow Button
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Magnetic Button Effect</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #1c1f2b;
font-family: Arial, sans-serif;
}
.button-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.button {
position: relative;
display: inline-block;
padding: 15px 40px;
font-size: 18px;
font-weight: bold;
color: white;
background: linear-gradient(45deg, #ff7eb3, #ff758c);
border: none;
border-radius: 12px;
text-transform: uppercase;
cursor: pointer;
transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
box-shadow: 0px 4px 15px rgba(255, 118, 140, 0.5);
overflow: hidden;
}
.button::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
border-radius: 50%;
opacity: 0;
transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.button:hover::before {
transform: translate(-50%, -50%) scale(3);
opacity: 1;
}
.button:hover {
background: linear-gradient(45deg, #ff758c, #ff7eb3);
box-shadow: 0px 8px 20px rgba(255, 118, 140, 0.7);
}
.button:active {
transform: scale(0.9);
}
.button::after {
content: "";
position: absolute;
top: -3px;
left: -3px;
width: calc(100% + 6px);
height: calc(100% + 6px);
border-radius: 12px;
border: 2px solid transparent;
background: linear-gradient(45deg, rgba(255, 118, 140, 0.8), rgba(255, 165, 0, 0.8), rgba(0, 255, 255, 0.8));
background-size: 200% 200%;
z-index: -1;
animation: glowing 2s infinite linear;
opacity: 0.6;
}
@keyframes glowing {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
</head>
<body>
<div class="button-container">
<button class="button">Button 1</button>
<button class="button">Button 2</button>
<button class="button">Button 3</button>
<button class="button">Button 4</button>
<button class="button">Button 5</button>
</div>
</body>
</html>