More Related Content
Similar to Html CSS Card Flip Effect
Similar to Html CSS Card Flip Effect (20)
Html CSS Card Flip Effect
- 1. html Css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🦁</title>
<link rel="stylesheet" href="amor.css">
</head>
<body>
<div class="card">
<div class="face front">
<img src="v1.jpg" alt="">
<h3>SOY TU PRINCIPE</h3>
</div>
<div class="face back">
<h3>INSECTA!</h3>
<P>No importa donde estes siempre sentire tu KI 🔥</P>
<div class="link">
<a href="https://www.youtube.com/watch?v=ptqdVwdTQ8Y">🎵 Para ti 🎵</a>
</div>
</div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
body {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
min-height: 100vh;
background: rgb(9, 74, 136);
}
.card {
position: relative;
width: 300px;
height: 350px;
margin: 20px;
}
.card .face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
border-radius: 10px;
overflow: hidden;
transition: .5s;
}
.card .front {
transform: perspective(600px) rotateY(0deg);
line-height: 50px;
}
.card .back .link a {
color: #f3f3f3;
}
.card .back h3 {
font-size: 30px;
margin-top: 20px;
letter-spacing: 2px;
}
.card .back p {
letter-spacing: 1px;
}
.card:hover .front {
transform: perspective(600px) rotateY(180deg);
}
.card:hover .back {
transform: perspective(600px) rotateY(360deg);
1 3
- 2. box-shadow: 0 5px 10px #000;
}
.card .front img {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
}
.card .front h3 {
position: absolute;
bottom: 0;
width: 100%;
height: 45px;
line-height: 45px;
color: #fff;
background: rgba(0, 0, 0, .4);
text-align: center;
}
.card .back {
transform: perspective(600px) rotateY(180deg);
background: rgb(3, 35, 54);
padding: 15px;
color: #f3f3f3;
display: flex;
flex-direction: column;
justify-content: space-between;
text-align: center;
box-shadow: 0 5px 10px #000;
}
.card .back .link {
border-top: solid 1px #f3f3f3;
height: 50px;
2