강의
https://youtu.be/OV8MVmtgmoY
코드
<!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>Document</title>
<style>
.maincontainer{
position: relative;
width: 250px;
height: 320px;
}
.thecard{
position: absolute;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: all 0.5s ease;
}
.thecard:hover{
transform: rotateY(180deg)
}
.thefront {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
background: #ffc728;
color: #333;
}
.theback {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
background: #fafafa;
color: #333;
transform: rotateY(180deg);
}
</style>
</head>
<body>
<div class="maincontainer">
<div class="thecard">
<div class="thefront">front of card</div>
<div class="theback">back of card</div>
</div>
</div>
</body>
</body>
</html>