<div class="box">
<img src="images/3.jpg" alt="" class="img">
<img src="images/4.jpg" alt="" class="img item">
<img src="images/4.jpg" alt="" class="img item">
<img src="images/4.jpg" alt="" class="img item">
<img src="images/4.jpg" alt="" class="img item">
<img src="images/4.jpg" alt="" class="img item">
<img src="images/4.jpg" alt="" class="img item">
</div>
body {
perspective: 1000px;
}
.box {
position: relative;
width: 800px;
height: 500px;
margin: 100px auto;
perspective: 3000px;
transform-style: preserve-3d;
animation: ani 6s linear infinite;
}
.box .img {
position: absolute;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -100px;
width: 200px;
height: 200px;
}
.box .item:nth-of-type(2) {
transform: rotateY(0) translateZ(300px);
}
.box .item:nth-of-type(3) {
transform: rotateY(60deg) translateZ(300px);
}
.box .item:nth-of-type(4) {
transform: rotateY(120deg) translateZ(300px);
}
.box .item:nth-of-type(5) {
transform: rotateY(180deg) translateZ(300px);
}
.box .item:nth-of-type(6) {
transform: rotateY(240deg) translateZ(300px);
}
.box .item:nth-of-type(7) {
transform: rotateY(300deg) translateZ(300px);
}
@keyframes ani {
0% {
transform: rotateY(0);
}
100% {
transform: rotateY(360deg);
}
}
