One panel turn

One panel flipping

by Abruzzi Hraig

HTML

<div id="f1_container">
<div id="f1_card" class="shadow">
  <div class="front face">
    <div id="glass"></div>
  </div>
  <div class="back face center">
  </div>
</div>
</div>

CSS

#f1_container {
  position: relative;
  margin: 1px;
  width: 70px;
  height: 70px;
  z-index: 1;
}
#f1_container {
  perspective: 1000;
}
#f1_card {
  width: 70px;
  height: 70px;
  transform-style: preserve-3d;
  transition: all .5s linear;
}
#f1_container:hover #f1_card {
  transform: rotateY(180deg);
}
.face {
  position: absolute;
  width: 70px;
  height: 70px;
  backface-visibility: hidden;
}
.face.back {
  /* the code below should be removed*/
  /* transform: rotateY(180deg); */
  background-color: blue;
    width:70px;
    height:70px;
    margin:1px;
}
#glass {
    width:70px;
    height:70px;
    background-color:red;
    opacity:.5;
    margin:1px;
}