🌐 Multiples Buttons
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button Hover Effect</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
.button-container {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.button {
position: relative;
display: inline-block;
padding: 15px 30px;
font-size: 16px;
font-weight: bold;
color: white;
background-color: black;
border: 2px solid transparent;
border-radius: 8px;
text-transform: uppercase;
overflow: hidden;
cursor: pointer;
transition: color 0.3s ease-in-out;
}
.button::before,
.button::after {
content: '';
position: absolute;
width: 0;
height: 100%;
background: linear-gradient(90deg, #ff7eb3, #ff758c);
transition: width 0.3s ease-in-out;
}
.button::before {
top: 0;
left: 0;
}
.button::after {
bottom: 0;
right: 0;
}
.button:hover::before,
.button:hover::after {
width: 100%;
}
.button:hover {
color: black;
}
.button:hover::before {
clip-path: polygon(0 0, 100% 0, 0 100%);
}
.button:hover::after {
clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
</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>