<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.wp{
width: 300px;
height: 300px;
margin:auto;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
animation: aa 5s linear infinite;
transform-style:preserve-3d;/*声明3D*/
transform: rotateX(15deg)rotateY(-15deg);
}
.wp .box1{
width: 300px;
height: 300px;
text-align: center;
font-size: 2.5em;
line-height: 300px;
position: absolute;
}
/*top*/
.wp .box1:nth-child(1){
background: rgba(255,0,0,0.5);
transform:rotateX(90deg) translateZ(150px);
transition: all 3s linear;
}
/*left*/
.wp .box1:nth-child(2){
background: rgba(0,255,0,0.5);
transform:rotateY(-90deg) translateZ(150px);
transition: all 3s linear;
}
/*rigth*/
.wp .box1:nth-child(3)
3D旋转嵌套的立方体
最新推荐文章于 2021-08-06 00:34:24 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)