<!DOCTYPE html>
<html>
<head>
<title>Titre du document</title>
<style>
.box {
background-color: transparent;
width: 220px;
height: 300px;
border: 1px solid #eeeeee;
perspective: 1000px;
}
.box-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
transition: transform 0.5s;
transform-style: preserve-3d;
}
.box:hover .box-inner {
transform: rotateY(180deg);
}
.box-front, .box-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
}
.box-front {
background-color: #cccccc;
color: #111111;
}
.box-back {
background-color: #8ebf42;
color: #eeeeee;
transform: rotateY(180deg);
}
</style>
</head>
<body>
<h2>Boîte de retournement 3D (Horizontale)</h2>
<p>Placez la souris sur la boîte pour voir l'effet:</p>
<div class="box">
<div class="box-inner">
<div class="box-front">
<h2>Face frontale</h2>
</div>
<div class="box-back">
<h2>Face arrière</h2>
</div>
</div>
</div>
</body>
</html>