<!DOCTYPE html>
<style>
div {
width: 100px;
height: 100px;
background-color: blue;
transform-origin: 50% 50%;
}
.container {
transform: rotate(45deg);
background-color: red;
perspective-origin: 150% 150%;
perspective: 500px;
}
#box1 {
transform: rotate(45deg);
}
#box2 {
transform: rotate3d(1,0,0,50deg) translate(200px);
}
#box3 {
transform: rotate3d(1, -2.5, 4, 30deg) translate(200px);
}
#box4 {
transform: rotate3d(0, 0, 0, 45deg);
}
#box5 {
transform: rotate3d(0, 0, 0, 45deg);
}
#box6 {
transform: rotate3d(1, 0, 0, 45deg);
}
#box7 {
transform: rotate3d(1, 0, 0, 45deg);
}
#box8 {
transform: rotate3d(0, 1, 0, 45deg);
}
#box9 {
transform: rotate3d(0, 1, 0, 45deg);
}
#box10 {
transform: rotate3d(0, 0, 1, 45deg);
}
#box11 {
transform: rotate3d(0, 0, 1, 45deg);
}
</style>
<div class="container">
<div id="box1">1</div>
<div id="box2">2</div>
</div>
<div id="box3">3</div>
<div id="box4">4</div>
<div id="box5">5</div>
<div id="box6">6</div>
<div id="box7">7</div>
<div id="box8">8</div>
<div id="box9">9</div>
<div id="box10">10</div>
<div id="box11">11</div>