
<div id="f1_container">
<div id="f1_card" class="shadow">
<div class="front face">
<img style="border-radius: 10px;
border: 3px solid white; box-shadow: #666 0px 0px 6px 0px;"
src="http://elcandildelospensamientos.files.wordpress.com/2011/10/5d2f6b095fd6reconocer-mi-cancion.jpg?w=300&h=300"
alt="" width="170" height="180" />
</div>
<div class="back face center">
<img style="border-radius: 10px; border: 3px solid white;
box-shadow: #666 0px 0px 6px 0px;"
src="https://img-fotki.yandex.ru/get/31412/131165231.137/0_15a369_c19a9d8f_orig"
alt="" width="170" height="180" />
</div></div>
CSS
<style type="text/css">
#f1_container {
position: relative;
margin: 10px auto;
width: auto;
height: auto;
z-index: 1;
}
#f1_container {
-webkit-perspective: 1120px;
-moz-perspective: 1120px;
-o-perspective: 1120px;
perspective: 1120px;
}
#f1_card {
width: auto;
height: auto;
-webkit-transform-style: preserve-3d;
-webkit-transition: all 1.0s linear;
-moz-transform-style: preserve-3d;
-moz-transition: all 1.0s linear;
-o-transform-style: preserve-3d;
-o-transition: all 1.0s linear;
transform-style: preserve-3d;
transition: all 1.0s linear;
}
#f1_container:hover #f1_card, #f1_container.hover_effect #f1_card {
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-o-transform: rotateY(180deg);
transform: rotateY(180deg);
-webkit-box-shadow: -5px 5px 5px #aaa;
-moz-box-shadow: -5px 5px 5px #aaa;
box-shadow: -5px 5px 5px #aaa;
}
.face {
position: absolute;
width: auto;
height: auto;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
}
.face.back {
display: block;
-webkit-transform: rotateY(180deg);
-webkit-box-sizing: border-box;
-moz-transform: rotateY(180deg);
-moz-box-sizing: border-box;
-o-transform: rotateY(180deg);
-o-box-sizing: border-box;
transform: rotateY(180deg);
box-sizing: border-box;
padding: 10px;
border-radius: 10px;
color: white;
text-align: center;
background-color: #aaa;
}
</style>