پیشنمایش زنده
کد HTML
<div class="card">
<div class="heading">
Skynet Studio
<p>Uiverse</p>
</div>
</div>
کد CSS
.card {
position: relative;
width: 190px;
height: 254px;
background: linear-gradient(-45deg, #161616 0%, #000000 100%);
color: #81818144;
display: flex;
flex-direction: column;
justify-content: end;
padding: 14px;
gap: 10px;
border-radius: 8px;
cursor: pointer;
}
.card::before {
content: "";
position: absolute;
inset: 0;
left: 0;
margin: auto;
width: 190px;
height: 260px;
border-radius: 10px;
background: linear-gradient(-45deg, #ff0000 0%, #d80000 40%);
z-index: -10;
pointer-events: none;
transition: all 0.8s cubic-bezier(0.175, 0.95, 0.9, 1.275);
box-shadow: 0px 20px 30px hsla(0, 0%, 0%, 0.521);
}
.card::after {
content: "";
z-index: -1;
position: absolute;
inset: 0;
width: 165px;
height: 245px;
background: linear-gradient(-45deg, #fc0000 0%, #f00000 100%);
transform: translate3d(0, 0, 0) scale(0.45);
}
.heading {
font-size: 20px;
text-transform: capitalize;
font-weight: 900;
}
.card p:not(.heading) {
font-size: 18px;
}
.card p:last-child {
color: #fa0000;
font-weight: 900;
}
.card:hover::after {
transition: all 0.2s cubic-bezier(0.175, 0.285, 0.82, 1.275);
}
.card:hover::before {
transform: scaleX(1.02) scaleY(1.02);
box-shadow: 0px 0px 30px 0px hsla(0, 100%, 50%, 0.356);
}