1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<!DOCTYPE html>
<html>
<head>
<style>
.central {
width: 350px;
height: 400px;
position: relative;
perspective: 1000px;
}
.face {
width: 100%;
height: 100%;
position: absolute;
transition: transform 1s;
backface-visibility: hidden;
}
.front {
transform: rotateY(0deg);
}
.back {
transform: rotateY(180deg);
}
.central:hover .front {
transform: rotateY(180deg);
}
.central:hover .back {
transform: rotateY(360deg);
}
/* Image miroir sur la face arrière */
.back img {
transform: scaleX(-1);
}
.face img {
width: 100%;
height: 100%;
object-fit: cover;
}
</style>
</head>
<body>
<div class="central">
<div class="face front">
<img src="paris.jpg" alt="premiere">
</div>
<div class="face back">
<img src="paris.jpg" alt="seconde">
</div>
</div>
</body>
</html> |