mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
95 lines
1.5 KiB
HTML
95 lines
1.5 KiB
HTML
<div class="card">
|
|
<div class="imgbox">
|
|
<div class="img"></div>
|
|
</div>
|
|
<div class="details">
|
|
<h2 class="title">John Doe</h2>
|
|
<span class="caption">Developer</span>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by alexruix - Tags: profile, gradient, card */
|
|
.card {
|
|
overflow: visible;
|
|
position: relative;
|
|
width: 190px;
|
|
height: 254px;
|
|
background: #fff;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
|
|
}
|
|
|
|
.card:before,
|
|
.card:after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 4px;
|
|
background: #fff;
|
|
transition: 0.5s;
|
|
z-index: -99;
|
|
}
|
|
|
|
.details {
|
|
position: absolute;
|
|
left: -10px;
|
|
right: 0;
|
|
bottom: 5px;
|
|
height: 60px;
|
|
text-align: center;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/*Image*/
|
|
.imgbox {
|
|
position: absolute;
|
|
top: 10px;
|
|
left: 10px;
|
|
bottom: 10px;
|
|
right: 10px;
|
|
background: #222;
|
|
transition: 0.5s;
|
|
z-index: 1;
|
|
}
|
|
|
|
.img {
|
|
background: #4158D0;
|
|
background-image: linear-gradient(45deg, #4158D0, #C850C0);
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
/*Text*/
|
|
.title {
|
|
font-weight: 600;
|
|
font-size: 20px;
|
|
color: #777;
|
|
}
|
|
|
|
.caption {
|
|
font-weight: 500;
|
|
font-size: 16px;
|
|
color: #4158D0;
|
|
display: block;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
/*Hover*/
|
|
.card:hover .imgbox {
|
|
bottom: 80px;
|
|
}
|
|
|
|
.card:hover:before {
|
|
transform: rotate(20deg);
|
|
}
|
|
|
|
.card:hover:after {
|
|
transform: rotate(10deg);
|
|
box-shadow: 0 2px 20px rgba(0, 0, 0, .2);
|
|
}
|
|
</style>
|