@keyframes box-ani {
    from {
        transform: rotateX(-10deg) rotateY(0deg);
    }

    to {
        transform: rotateX(-10deg) rotateY(360deg);
    }

}

body {
    background-color: black;
}

#box2 {
    /* border: 2px solid palevioletred; */
    height: 250px;
    width: 250px;
    position: fixed;
    left: calc(50% - 125px);
    top: calc(50% - 125px);
    /* 变为3d空间 */
    transform-style: preserve-3d;
    transform: rotateX(10deg) rotateY(10deg);
    animation-name: box-ani;
    /* 持续时间 次数 效果 等属性*/
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-play-state: paused;
}

#box2>img {
    width: 100%;
    height: 100%;
    /* 绝对定位，以父级为标准定位 */
    position: absolute;
    left: 0px;
    top: 0px;
    /* box阴影 */
    box-shadow: 0px 0px 10px 10px white;
}

#box2>img:nth-child(1) {
    transform: translateZ(125px);
}

#box2>img:nth-child(2) {
    transform: rotateY(180deg) translateZ(125px);
}

#box2>img:nth-child(3) {
    transform: rotateX(270deg) translateZ(125px);
}

#box2>img:nth-child(4) {
    transform: rotateY(90deg) translateZ(125px);
}

#box2>img:nth-child(5) {
    transform: rotateX(90deg) translateZ(125px);
}

#box2>img:nth-child(6) {
    transform: rotateY(270deg) translateZ(125px);
}

#box2>img:nth-child(n) {
    opacity: 0.4;
}

#box2>img:nth-child(7) {
    transform: scale3d(0.5, 0.5, 0.5) translateZ(125px);
}

#box2>img:nth-child(8) {
    transform: scale3d(0.5, 0.5, 0.5) rotateY(180deg) translateZ(125px);
}

#box2>img:nth-child(9) {
    transform: scale3d(0.5, 0.5, 0.5) rotateX(270deg) translateZ(125px);
}

#box2>img:nth-child(10) {
    transform: scale3d(0.5, 0.5, 0.5) rotateY(90deg) translateZ(125px);
}

#box2>img:nth-child(11) {
    transform: scale3d(0.5, 0.5, 0.5) rotateX(90deg) translateZ(125px);
}

#box2>img:nth-child(12) {
    transform: scale3d(0.5, 0.5, 0.5) rotateY(270deg) translateZ(125px);
}