.

.

.

.

.

.

body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #f0f0f0; } .cube-container { perspective: 1000px; } .cube { position: relative; width: 200px; transform-style: preserve-3d; transform: rotateX(-30deg) rotateY(-45deg); animation: rotate 10s infinite linear; } .face { position: absolute; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.9); border: 1px solid #ccc; display: flex; justify-content: center; align-items: center; font-size: 20px; } .front { transform: rotateY( 0deg) translateZ(100px); } .back { transform: rotateY(180deg) translateZ(100px); } .right { transform: rotateY( 90deg) translateZ(100px); } .left { transform: rotateY(-90deg) translateZ(100px); } .top { transform: rotateX( 90deg) translateZ(100px); } .bottom { transform: rotateX(-90deg) translateZ(100px); } @keyframes rotate { from { transform: rotateX(-30deg) rotateY(-45deg); } to { transform: rotateX(-30deg) rotateY(315deg); } } .cube-container:hover .cube { animation-play-state: paused; }

.

.