<section class="container">
  <div id="cube">
    <figure class="back"></figure>
    <figure class="left"></figure>
    <figure class="bottom"></figure>
  </div>
</section>
.container {
  width: 150px;
  height: 150px;
  margin: 50px auto;
  position: relative;
}

#cube {
  width: 100%;
  height: 100%;
  position: absolute;
}

#cube figure {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 2px solid black;
  position: absolute;
}

#cube .back {
  background: hsla(0, 100%, 50%, 0.5); 
}

#cube .left {
  background: hsla(60, 100%, 50%, 0.5);
}

#cube .bottom {
  background: hsla(120, 100%, 50%, 0.5);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js