.blue:active {
  /*clockwise*/
  transform: rotate(15deg);
}

.yellow:active {
  /*counter-clockwise*/
  transform: rotate(-15deg);
}

.blue {
  width: 150px;
  height: 150px;
  background-color: #3498DB;
  border-radius: 20px;
  margin: 50px;
}

.yellow {
  width: 150px;
  height: 150px;
  background-color: #DBBC34;
  border-radius: 20px;
  margin: 50px;
}