.image{
transform: rotateY(180deg);
}
img{
transform: rotateY(180deg);
}
/* entire container, keeps perspective */
.flip-container {
perspective: 1000px;
}
/* flip the pane when hovered */
.flip-container:hover .flipper, .flip-container.hover .flipper {
transform: rotateY(180deg);
}
.flip-container, .front, .back {
width: 320px;
height: 480px;
}
/* flip speed goes here */
.flipper {
transition: 0.6s;
transform-style: preserve-3d;
position: relative;
}
/* hide back of pane during swap */
.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
/* front pane, placed above back */
.front {
z-index: 2;
/* for firefox 31 */
transform: rotateY(0deg);
}
/* back, initially hidden pane */
.back {
transform: rotateY(180deg);
}
<div class="flip">
<div class="flip-content">
<div class="flip-front">
<img src="https://www.fillmurray.com/150/150" />
</div>
<div class="flip-back">
<strong>BILL MURRAY</strong>
</div>
</div>
</div>
.flip {
width: 100%;
}
.flip-content {
transition: transform 0.4s;
transform-style: preserve-3d;
}
.flip:hover .flip-content {
transform: rotateY(180deg);
transition: transform 0.3s;
}
.flip-front, .flip-back {
backface-visibility: hidden;
}
.flip-back {
transform: rotateY(180deg);
}
Code Example |
---|
Css :: up arrow css |
Css :: css background image |
Css :: flexbox elements |
Css :: fonts for css |
Css :: css transitions |
Css :: tailwind css next |
Css :: scroll div when page scroll |
Css :: css box |
Css :: put a background image in css with absolute layout |
Css :: css symbol |
Css :: css color codes |
Css :: how to fix rough text html |
Css :: operador css contain attr |
Css :: mixed-blend-mode css all properties |
Css :: comment in css |
Css :: wordpress classic editor on post type |
Css :: html incliude all css from folder |
Css :: como fazer uma linha vertical no html |
Css :: insert checkbox into combobox css |
Css :: scale to smaller of vh and vw |
Css :: div position by default |
Css :: how to make grid css |
Css :: ui gradient |
Css :: css box-sizing property |
Css :: css light mode |
Css :: vendor css |
Css :: linear gradient css |
Css :: initialize toast |
Css :: what is bulletproof buttons |
Css :: what does it mean when we write width :100%? |