3D旋转 暂存 还不完善
<!DOCTYPE html>
<html lang="zh-CN">
<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>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: black;
}
.box {
width: 300px;
height: 450px;
margin: 200px auto;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
transform-style: preserve-3d;
transform: rotateX(-5deg) rotateY(0deg);
animation: run 50s linear infinite;
}
.box img {
width: 300px;
height: 450px;
position: absolute;
left: 0;
top: 0;
border: 2px solid #fff;
border-radius: 5px;
}
.box img:nth-child(1) {
transform: rotateY(0deg) translateZ(500px);
}
.box img:nth-child(2) {
transform: rotateY(36deg) translateZ(500px);
}
.box img:nth-child(3) {
transform: rotateY(72deg) translateZ(500px);
}
.box img:nth-child(4) {
transform: rotateY(108deg) translateZ(500px);
}
.box img:nth-child(5) {
transform: rotateY(144deg) translateZ(500px);
}
.box img:nth-child(6) {
transform: rotateY(180deg) translateZ(500px);
}
.box img:nth-child(7) {
transform: rotateY(216deg) translateZ(500px);
}
.box img:nth-child(8) {
transform: rotateY(252deg) translateZ(500px);
}
.box img:nth-child(9) {
transform: rotateY(288deg) translateZ(500px);
}
.box img:nth-child(10) {
transform: rotateY(324deg) translateZ(500px);
}
.box img:nth-child(11) {
transform: rotateY(360deg) translateZ(500px);
}
/* @keyframes run {
0% {
transform: rotateX(0deg) rotateY(0deg);
}
25% {
transform: rotateX(20deg) rotateY(90deg);
}
50% {
transform: rotateX(0deg) rotateY(180deg);
}
75% {
transform: rotateX(-20deg) rotateY(270deg);
}
100% {
transform: rotateX(0deg) rotateY(360deg);
}
} */
@keyframes run {
0% {
/* transform: rotateX(0deg); */
}
25% {
/* transform: rotateX(20deg); */
}
50% {
/* transform: rotateX(0deg); */
}
75% {
/* transform: rotateX(-20deg); */
}
100% {
transform: rotateX(0deg) rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="box">
<img src="./images/LOL01.jpg" alt="" />
<img src="./images/LOL02.jpg" alt="" />
<img src="./images/LOL03.jpg" alt="" />
<img src="./images/LOL04.jpg" alt="" />
<img src="./images/LOL05.jpg" alt="" />
<img src="./images/LOL06.jpg" alt="" />
<img src="./images/LOL07.jpg" alt="" />
<img src="./images/LOL08.jpg" alt="" />
<img src="./images/LOL09.jpg" alt="" />
<img src="./images/LOL10.jpg" alt="" />
</div>
</body>
</html>