mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
175 lines
3.3 KiB
HTML
175 lines
3.3 KiB
HTML
<div class="card">
|
|
<div class="card__corner"></div>
|
|
<div class="card__img">
|
|
<span class="card__span">Category</span>
|
|
</div>
|
|
<div class="card-int">
|
|
<p class="card-int__title">This is the article title</p>
|
|
<p class="excerpt">Lorem ipsum dolor sit amet consectetur adipiscing elit, donec suspendisse vulputate dictumst enim per mus imperdiet, platea non massa dictum tempus sapien.</p>
|
|
<button class="card-int__button">Show</button>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by Rodrypaladin - Tags: animation, blue, button, card, modern, gradients, click effect, click animation */
|
|
.card {
|
|
width: 275px;
|
|
position: relative;
|
|
background: rgb(255, 255, 255);
|
|
padding: 20px;
|
|
}
|
|
|
|
.card::after {
|
|
z-index: -1;
|
|
content: "";
|
|
position: absolute;
|
|
width: 50%;
|
|
height: 10px;
|
|
bottom: 15px;
|
|
right: 0;
|
|
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.4);
|
|
transform: rotate(5deg);
|
|
transition: all 0.1s ease-in;
|
|
}
|
|
|
|
.card::before {
|
|
z-index: -1;
|
|
content: "";
|
|
position: absolute;
|
|
width: 50%;
|
|
height: 10px;
|
|
bottom: 15px;
|
|
left: 0;
|
|
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.4);
|
|
transform: rotate(-5deg);
|
|
transition: all 0.1s ease-in;
|
|
}
|
|
|
|
.card:hover:before, .card:hover:after {
|
|
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.6);
|
|
}
|
|
|
|
.card:hover:before {
|
|
transform: rotate(-8deg);
|
|
}
|
|
|
|
.card:hover:after {
|
|
transform: rotate(8deg);
|
|
}
|
|
|
|
.card__img {
|
|
position: relative;
|
|
background: #FFFFFF;
|
|
background: linear-gradient(315deg, #68aeff, #0032a6);
|
|
width: 100%;
|
|
height: 175px;
|
|
}
|
|
|
|
.card__span {
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
position: absolute;
|
|
background-color: white;
|
|
top: 10px;
|
|
left: 10px;
|
|
padding: 3px 7px;
|
|
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.2);
|
|
transition: transform 0.1s ease-in;
|
|
user-select: none;
|
|
}
|
|
|
|
.card__span:hover {
|
|
transform: translateX(5px);
|
|
}
|
|
|
|
.card-int {
|
|
padding: 20px 0 0 0;
|
|
}
|
|
|
|
.card-int__title {
|
|
font-weight: bold;
|
|
font-size: 1.2rem;
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.card-int__button {
|
|
cursor: pointer;
|
|
margin: 20px 0 0 0;
|
|
padding: 7px 20px;
|
|
width: 100%;
|
|
background-color: rgb(238, 246, 255);
|
|
border: none;
|
|
color: black;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0);
|
|
transition: box-shadow 0.1s ease-in;
|
|
user-select: none;
|
|
}
|
|
|
|
.card-int__button:active {
|
|
box-shadow: 0px 0px 15px rgba(0, 119, 255, 0.5);
|
|
}
|
|
|
|
.card-int__button:hover::before {
|
|
animation: effect_two 0.4s 1;
|
|
}
|
|
|
|
.card-int__button::before {
|
|
content: 'More for this article';
|
|
color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: absolute;
|
|
background: rgb(0,133,255);
|
|
background: linear-gradient(146deg, #0032a6 0%, #68aeff 100%);
|
|
width: 100%;
|
|
height: 100%;
|
|
top: 0;
|
|
left: 0;
|
|
transform: translateX(-99%);
|
|
z-index: 1;
|
|
animation: effect_one 10s infinite;
|
|
}
|
|
|
|
.card-int__button:hover::before {
|
|
transform: translateX(0%);
|
|
}
|
|
|
|
.excerpt {
|
|
font-size: 14px;
|
|
}
|
|
|
|
@keyframes effect_one {
|
|
0% {
|
|
transform: translateX(-99%);
|
|
}
|
|
|
|
25% {
|
|
transform: translateX(-90%);
|
|
}
|
|
|
|
50% {
|
|
transform: translateX(-80%);
|
|
}
|
|
|
|
75% {
|
|
transform: translateX(-95%);
|
|
}
|
|
|
|
100% {
|
|
transform: translateX(-99%);
|
|
}
|
|
}
|
|
|
|
@keyframes effect_two {
|
|
to {
|
|
transform: translateX(-1%);
|
|
}
|
|
|
|
from {
|
|
transform: translateX(-99%);
|
|
}
|
|
}
|
|
</style>
|