پیشنمایش زنده
کد HTML
<div class="card-container"></div>
کد CSS
/* Button Container with Metallic Gradient and Depth */
.card-container {
position: relative;
width: 200px;
height: 200px;
background: linear-gradient(135deg, #e0e0e000, #c0c0c000);
border-radius: 30px;
box-shadow:
6px 6px 12px rgba(0, 0, 0, 0.3),
-6px -6px 12px rgba(255, 255, 255, 0.3),
inset 2px 2px 4px rgba(255, 255, 255, 0.4),
inset -2px -2px 4px rgba(0, 0, 0, 0.5);
transition:
transform 0.3s ease,
box-shadow 0.3s ease;
}
/* Shining Effect Overlay */
.card-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(
45deg,
transparent,
rgba(255, 255, 255, 0.7),
transparent
);
background-size: 200% 200%;
animation: shine 2s infinite ease-in-out;
border-radius: 30px;
}
@keyframes shine {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}