پیشنمایش زنده
کد HTML
<div class="card">
<div class="card-info">
<p class="title">New Magic Card</p>
</div>
</div>
کد CSS
.card {
--background: linear-gradient(to left, #8c43f2 0%, #ff5c00 100%);
width: 220px;
height: 294px;
padding: 10px;
border-radius: 01rem;
overflow: visible;
background: #8c43f2;
background: var(--background);
position: relative;
z-index: 1;
}
.card::after {
position: absolute;
content: "";
top: 40px;
left: 0;
right: 0;
z-index: -1;
height: 100%;
width: 100%;
transform: scale(0.9);
filter: blur(30px);
background: #8c43f2;
background: var(--background);
transition: opacity 0.5s;
}
.card-info {
--color: #ffffff;
background: var(--color);
color: var(--color);
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
overflow: visible;
border-radius: 0.6rem;
}
.card .title {
font-weight: bold;
letter-spacing: 0.1em;
}
/*Hover*/
.card:hover::after {
opacity: 0;
}
.card:hover .card-info {
color: #8c43f2;
transition: color 1s;
}