<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotateX -->

<div>Normal</div>
<div class="rotated">Rotated</div>
* {
  box-sizing: border-box;
}
div {
  position: absolute;
  top: 0;
  left: 0;
  width: 380px;
  height: 400px;
  background-color: skyblue;
}

.rotated {
  transform-origin: 0 0;
  transform: rotateX(-15deg);
  background-color: pink;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.