<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
perspective: 800px;
}
.box{
width: 250px;
height: 500px;
margin: 200px auto;
position: relative;
transform-style: preserve-3d;
animation: pao 5s linear infinite;
}
.box div{
width: 250px;
height: 500px;
background-color: aqua;
position: absolute;
opacity: .6;
}
.box div:nth-child(1){
transform: rotate(0) translateZ(360px);
}
.box div:nth-child(2){
transform: rotateY(45deg) translateZ(360px);
}
.box div:nth-child(3){
transform: rotateY(90deg) translateZ(360px);
}
.box div:nth-child(4){
transform: rotateY(135deg) translateZ(360px);
}
.box div:nth-child(5){
transform: rotateY(180deg) translateZ(360px);
}
.box div:nth-child(6){
transform: rotateY(225deg) translateZ(360px);
}
.box div:nth-child(7){
transform: rotateY(270deg) translateZ(360px);
}
.box div:nth-child(8){
transform: rotateY(315deg) translateZ(360px);
}
.box:hover{
animation-play-state: paused;
}
@keyframes pao {
0%{
transform: rotateY(0);
}
100%{
transform: rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="box">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>