<!DOCTYPE html>
<head>
  <style>

.demo > * {
  width: 250px;
  height: 200px;
  padding: 1em;
}

.demo > * + * {
  margin-top: -150px;
  opacity: 0.75;
}

.demo > :first-child {
  background: aliceblue;
  border: 12px solid red;
  z-index: 4;
}

.demo > :nth-child(2) {
  background: pink;
  border: 2px solid blue;
  margin-left: 50px;
  z-index: 1;
}

.demo > :last-child {
  background: wheat;
  border: 2px solid gold;
  z-index: 4;
  margin-left: 25px;
}
    </style>
</head>
<body>
<div class="demo">
  <d