project demo
html code
Front-Back Card on Hover
Card Back
This is back page of card
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Non, incidunt!
css code
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html,
body {
display: grid;
height: 100%;
place-items: center;
background: #f7b42c;
font-family: 'Poppins', sans-serif;
}
/* Flip card styles */
.container {
perspective: 1000px;
display: flex;
justify-content: center;
align-items: center;
height: 300px;
}
.card {
width: 200px;
height: 300px;
position: relative;
transform-style: preserve-3d;
transition:
transform .6s cubic-bezier(.4, 0, .2, 1);
}
.container:hover .card {
transform: rotateY(180deg);
}
.card-front,
.card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
overflow: hidden;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
-webkit-box-reflect: below 5px linear-gradient(transparent, rgba(255, 255, 255, 0.2));
}
.card-front img {
width: 100%;
height: 100%;
cursor: pointer;
object-fit: cover;
}
.card-back {
background: #212121;
color: #d4d3d3;
text-align: center;
transform: rotateY(180deg);
}
.card-back h2 {
font-size: 20px;
margin-bottom: 10px;
font-weight: 500;
}
p {
font-size: 12px;
letter-spacing: 1px;
margin-top: 15px;
font-weight: 300;
}