<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.container { | |
margin: 50px; | |
height: 300px; | |
width: 300px; | |
border: 1px solid black; | |
perspective: 500px; | |
perspective-origin: top left; | |
} | |
.transformed { | |
width: 100%; | |
height: 100%; | |
transform: rotateY(45deg); | |
background-color: blue; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="transformed"></div> | |
</div> | |
</body> | |
</html> |