HTML _CSS
FILP CARD
HiroDaegu
2022. 5. 20. 00:49
728x90
SMALL
<!DOCTYPE html>
<html lang="ko">
<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">
<link rel="stylesheet" href="style.css">
<title>FLIP CARD</title>
</head>
<body>
<div class="container">
<div class="card">
<div class="front">
<img class="img" src="./1.png">
<h2>I'm IRONMAN!</h2>
</div>
<div class="back">
<img class="img" src="./2.png">
<h2>I'm IRONMAN!</h2>
<b>Tony Stark</b>
</div>
</div>
</div>
</body>
</html>
* {
text-align: center;
}
.card {
width: 200px;
height: 220px;
position: relative;
background-color: transparent;
transition: transform .8s;
transform-style: preserve-3d;
}
.card:hover {
transform: rotateY(180deg);
cursor: pointer;
}
.front, .back {
width: 100%;
height: 100%;
background-color: #fff;
padding-top: 20px;
position: absolute;
border-radius: 10px;
backface-visibility: hidden;
display: table-row;
justify-content: center;
}
.front {
background: linear-gradient(90deg, rgba(180, 58, 170, 1) 0%,rgba(200, 29, 253, 1) 35%,rgba(252, 176, 69, 1) 100%);
}
.img {
width: 100px;
height: 100px;
}
.back {
transform: rotateY(180deg);
background-color: #cc3333;
}
728x90
LIST