body { font-family: sans-serif; }

.scenecdbox {
  width: 400px;
  height: 400px;
  border: 1px solid #FFF;
  margin: 60px;
  perspective: 400px;
  top: 0px;	
  left: -150px;
  
}

.cdbox {
  width: 400px;
  height: 400px;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(-50px);
  transition: transform 1s;
}

.cdbox.show-front  { transform: translateZ( 0px) rotateY(   0deg); }
.cdbox.show-back   { transform: translateZ( 0px) rotateY(-180deg); }
.cdbox.show-right  { transform: translateZ(-150px) rotateY( -90deg); }
.cdbox.show-left   { transform: translateZ(-150px) rotateY(  90deg); }
.cdbox.show-top    { transform: translateZ(-150px) rotateX( -90deg); }
.cdbox.show-bottom { transform: translateZ(-150px) rotateX(  90deg); }


.cdbox__face {
  position: absolute;
  border: 1px none #999;
  font-size: 40px;
  font-weight: bold;
  color: white;
  text-align: center;
}

.cdbox__face--front,
.cdbox__face--back {
  width: 400px;
  height: 400px;
  line-height: 400px;
}

.cdbox__face--right,
.cdbox__face--left {
  width: 90px;
  height: 400px;
  left: 100px;
  line-height: 400px;
}

.cdbox__face--top,
.cdbox__face--bottom {
  width: 400px;
  height: 90px;
  top: 50px;
  line-height: 90px;
}

.cdbox__face--front  { background: #999;  }
.cdbox__face--right  { background: #999;  }
.cdbox__face--back   { background: #999;  }
.cdbox__face--left   { background: #999;  }
.cdbox__face--top    { background: #999;  }
.cdbox__face--bottom { background: #999;  }

.cdbox__face--front  { transform: rotateY(  0deg) translateZ( 45px); }
.cdbox__face--back   { transform: rotateY(180deg) translateZ( 45px); }

.cdbox__face--right  { transform: rotateY( 90deg) translateZ(255px); }
.cdbox__face--left   { transform: rotateY(-90deg) translateZ(145px); }

.cdbox__face--top    { transform: rotateX( 90deg) translateZ(95px); }
.cdbox__face--bottom { transform: rotateX(-90deg) translateZ(305px); }

label { margin-right: 10px; }


/* Test out changes to above - https://codepen.io/desandro/pen/MGpMOV */
