Here is a cool example of using perspectives with 3D boxes.

These change the perspective of the box.

Perspective

.cube { perspective: 500px; }

These change the rotation of the box.

Rotation

.cube { transform: rotateX(20deg); }

Rotation

.cube { animation: rotate 4s linear infinite; } @keyframes rotate { from { transform: rotateY(-180deg); } to { transform: rotateY(180deg); } }
HTML
CSS
Output