Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-color:#E7E9EB;
}
#myDIV {
  height:300px;
  background-color:#FFFFFF;
}
#div1 {
  position: relative;
  margin: auto;
  height: 150px;
  width: 250px;
  padding: 10px;
  border: 1px solid black;
  perspective: 600px;
  perspective-origin: right bottom;
}
#div2 {
  padding: 50px;
  position: absolute;
  border: 1px solid black;
  background-color: red;
  transform: rotateX(45deg);
}
</style>
</head>
<body>
<h1>The perspective-origin property</h1>
<div id="myDIV">
  <div id="div1">DIV1
  <div id="div2">Think that you are looking at a wall of a building.
  See what happens with the perspective when you gradually move closer to the building.</div>
</div>  </div>
</body>
</html>