mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
104 lines
1.8 KiB
HTML
104 lines
1.8 KiB
HTML
<div class="container">
|
|
<div class="card">
|
|
<p class="title">Card title</p>
|
|
<div class="card-hidden">
|
|
<p class="title-in">Card title</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam at est orci. Nam molestie pellentesque mi nec lacinia.</p>
|
|
<a class="button">Button</a>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="card-border"></div>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by alexruix - Tags: white, card, hover, clean */
|
|
.container {
|
|
position: relative;
|
|
width: 190px;
|
|
height: 254px;
|
|
}
|
|
|
|
.card {
|
|
position: relative;
|
|
width: 190px;
|
|
height: 254px;
|
|
background: #f5f5f5;
|
|
border-radius: 8px;
|
|
color: #232323;
|
|
padding: 16px;
|
|
border: 1px solid #232323;
|
|
transition: all .5s ease-in-out;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card-hidden {
|
|
display: flex;
|
|
transform: translateY(200%);
|
|
flex-direction: column;
|
|
gap: .5rem;
|
|
transition: transform .5s ease-in, opacity .3s ease-in;
|
|
opacity: 0;
|
|
}
|
|
|
|
.card-border {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
left: 0;
|
|
top: 0;
|
|
border: 1px dashed #232323;
|
|
border-radius: 8px;
|
|
z-index: -1;
|
|
}
|
|
|
|
/*Hovers*/
|
|
.card:hover {
|
|
transform: translate(-15px, -15px);
|
|
border-color: #5bc0eb;
|
|
}
|
|
|
|
.card:hover .card-hidden {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
.card:hover .title {
|
|
transform: translateY(200%);
|
|
}
|
|
|
|
/*Text*/
|
|
.title {
|
|
position: absolute;
|
|
bottom: 1rem;
|
|
font-weight: 700;
|
|
font-size: 1.5rem;
|
|
transition: transform .25s ease-out;
|
|
}
|
|
|
|
.title-in {
|
|
font-weight: 700;
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
/*Button*/
|
|
.button {
|
|
display: inline-flex;
|
|
justify-content: center;
|
|
padding: 8px;
|
|
border-radius: 24px;
|
|
font-weight: 600;
|
|
background-color: #5bc0eb;
|
|
cursor: pointer;
|
|
transition: background-color .3s ease-in-out;
|
|
}
|
|
|
|
.button:hover {
|
|
background-color: #53aed4;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|