.flip-horizontally {
transform: scaleX(-1);
}
.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 :: max z index |
Css :: add shadows on an image css |
Css :: inner box shadow |
Css :: css selector start with |
Css :: random color scss |
Css :: how to set the first column of the table in center in css |
Css :: restrict a paragraph height css |
Css :: span nowrap |
Css :: how to make img cover parent div |
Css :: text align justify |
Css :: gatsby hide scrollbar |
Css :: box sizing reset |
Css :: ion-tab-bar transparent |
Css :: flexbox center and space between |
Css :: christmas red color code |
Css :: twig ternaire |
Css :: gradient border css |
Css :: text break css |
Css :: tablet screen size css |
Css :: who created css |
Css :: how to add shadow in css |
Css :: css remove scrollbars |
Css :: multiple css media queries |
Css :: html dim entire screen |
Css :: resize image slowly on hover |
Css :: html input background color |
Css :: text glow |
Css :: select html stop blue border |
Css :: css distance between text and input box |
Css :: center div inside div vertically and horizontally |