<div class="div1">
  <div class="div2">W3TR</div>
</div>
.div1 {
    position: relative;
    height: 150px;
    width: 150px;
    margin: 50px;
    padding: 10px;
    border: 1px solid black;
    -webkit-perspective: 100px; /* Chrome, Safari, Opera  */
    perspective: 100px;
    perspective-origin: 50% 50%;
  
}
.div2 {
    padding: 50px;
    position: absolute;
    border: 5px solid red;
    background-color: green;
    -webkit-transform: rotateX(50deg); /* Chrome, Safari, Opera  */
    transform: rotateX(50deg);
    color: white;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.