* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 40px 20px;
}
h1 {
color: white;
font-size: 2.5rem;
font-weight: 300;
margin-bottom: 3rem;
text-align: center;
}
.button-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 30px;
max-width: 900px;
width: 100%;
}
.btn {
padding: 18px 40px;
font-size: 16px;
font-weight: 500;
text-decoration: none;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
display: inline-block;
position: relative;
overflow: hidden;
}
/* Button 1: Slide Background */
.btn-slide {
background: #ff6b6b;
z-index: 1;
}
.btn-slide::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: #ee5a52;
z-index: -1;
transition: left 0.4s ease;
}
.btn-slide:hover::before {
left: 0;
}
.btn-slide:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}
/* Button 2: Glow Effect */
.btn-glow {
background: #4ecdc4;
box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}
.btn-glow:hover {
box-shadow: 0 0 30px rgba(78, 205, 196, 0.8),
0 0 60px rgba(78, 205, 196, 0.6);
transform: scale(1.05);
}
/* Button 3: Border Animation */
.btn-border {
background: transparent;
border: 2px solid #f7b731;
color: #f7b731;
position: relative;
}
.btn-border::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background: #f7b731;
transition: width 0.4s ease;
z-index: -1;
}
.btn-border:hover {
color: white;
}
.btn-border:hover::before {
width: 100%;
}
/* Button 4: Ripple Effect */
.btn-ripple {
background: #a29bfe;
}
.btn-ripple::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
transform: translate(-50%, -50%);
transition: width 0.6s ease, height 0.6s ease;
}
.btn-ripple:hover::before {
width: 300px;
height: 300px;
}
/* Button 5: Gradient Shift */
.btn-gradient {
background: linear-gradient(90deg, #fd79a8 0%, #fdcb6e 100%);
background-size: 200% 100%;
animation: gradient-shift 3s ease infinite;
}
@keyframes gradient-shift {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
.btn-gradient:hover {
animation-play-state: paused;
transform: scale(1.08);
box-shadow: 0 8px 20px rgba(253, 121, 168, 0.5);
}
/* Button 6: 3D Flip */
.btn-flip {
background: #00b894;
transform-style: preserve-3d;
transition: transform 0.6s ease;
}
.btn-flip:hover {
transform: rotateX(360deg);
box-shadow: 0 10px 30px rgba(0, 184, 148, 0.5);
}
/* Button 7: Pulse Animation */
.btn-pulse {
background: #e17055;
animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
box-shadow: 0 0 0 0 rgba(225, 112, 85, 0.7);
}
50% {
transform: scale(1.05);
box-shadow: 0 0 0 15px rgba(225, 112, 85, 0);
}
}
.btn-pulse:hover {
animation-play-state: paused;
}
/* Button 8: Shine Effect */
.btn-shine {
background: #6c5ce7;
position: relative;
overflow: hidden;
}
.btn-shine::after {
content: '';
position: absolute;
top: -50%;
left: -100%;
width: 50%;
height: 200%;
background: linear-gradient(90deg,
transparent,
rgba(255, 255, 255, 0.4),
transparent);
transform: skewX(-20deg);
transition: left 0.6s ease;
}
.btn-shine:hover::after {
left: 150%;
}
@media (max-width: 768px) {
.button-container {
grid-template-columns: 1fr;
}
h1 {
font-size: 2rem;
}
}
No comments yet. Be the first!