CSS perspective
perspective 속성이 사용자와 요소가 있는 평면 사이의 거리를 어떻게 정의하는지 보여주는 다이어그램
<div class="container"> <!-- perspective가 적용될 요소 -->
    <div class="rotator">Rotator</div> <!-- 3D transform이 적용될 요소 -->
</div>
.container {
    border: 3px dashed #663399;
    perspective: /* value */
}
.rotator {
    background-color: rgba(255, 0, 200, .4);
    transform: rotateY(30deg);
}
실제 적용된 모습 perspective 값이 작으면 3D 요소가 더 크게, 값이 크면 더 작게 보이도록 하여 깊이감을 조절할 수 있습니다.
selector {
    perspective: none | <길이>
}
/* 키워드 값 */
perspective: none;

/* <길이> 값 */
perspective: 200px;
perspective: 50em;
perspective: 20vw;
perspective: 23vh;

/* 글로벌 값 */
perspective: inherit;
perspective: initial;
perspective: revert;
perspective: revert-layer;
perspective: unset;
<div class="container"> <!-- perspective가 적용될 요소 -->
    <div class="rotator">Rotator</div> <!-- 3D transform이 적용될 요소 -->
</div>
.container {
    border: 3px dashed #663399;
    perspective: /* value */
}
.rotator {
    background-color: rgba(255, 0, 200, .4);
    transform: rotateY(30deg);
}
<figure>
    <figcaption>부모 요소에 prespective 속성을 지정한 경우</figcaption>
    <div class="parent perspective-parent">
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
    </div>
</figure>
<figure>
    <figcaption>자식 요소에 각각 prespective() 함수 값을 지정한 경우</figcaption>
    <div class="parent perspective-child">
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
        <div class="child"></div>
    </div>
</figure>
/*
 * 일부 스타일 코드는 가독성을 위해 생략했습니다!
*/
.parent {
    border: 2px solid blue;
    background-color: gray;
}
.child {
    height: 150px;
    background-color: blue;
}
.perspective-parent { /* 부모 요소에 prespective 속성을 지정 */
    perspective: 800px;
}
.perspective-parent .child {
    transform: rotateX(60deg);
}
.perspective-child .child { /* 자식 요소에 각각 prespective() 함수 값을 지정 */
    transform: perspective(800px) rotateX(60deg);
실제 적용된 모습