<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
}
section{
width: 400px;
height: 400px;
margin: 100px auto;
position: relative;
transform-style: preserve-3d;
/* perspective: 200px; */
transform: rotateX(-30deg) rotateY(-20deg);
transition: 3s;
}
div{
width: 400px;
height: 400px;
text-align: center;
line-height: 400px;
font-weight: 900;
font-size: 100px;
position:absolute;
opacity: 0.7;
}
div:nth-child(1){
transform: translateZ(200px);
background:purple;
}
div:nth-child(2){
transform: translateZ(-200px);
background:green;
}
div:nth-child(3){
transform: translateY(-200px) rotateX(90deg);
background:orangered;
}
div:nth-child(4){
transform: translateY(200px) rotateX(90deg);
background:blue;
}
div:nth-child(5){
transform:translateX(-200px) rotateY(-90deg) ;
background:brown;
}
div:nth-child(6){
transform:translateX(200px) rotateY(90deg);
background:indianred;
}
section:hover{
transform: rotateX(360deg) rotateY(360deg);
}
</style>
</head>
<body>
<section>
<div>⚀</div>
<div>⚁</div>
<div>⚂</div>
<div>⚃</div>
<div>⚄</div>
<div>⚅</div>
</section>
</body>
</html>