目录
一.设置CSS样式
* {
margin: 0px;
padding: 0px;
}
html {
overflow: hidden;
height: 100%;
background: linear-gradient(rgb(0, 238, 255) 0%, #000 100%);
}
.title {
color: rgb(255, 0, 200);
text-align: center;
text-shadow: 0px 1px 0px #999, 0px 2px 0px #888, 0px 3px 0px #777, 0px 4px 0px #666, 0px 5px 0px #555, 0px 6px 0px #444, 0px 7px 0px #333, 0px 8px 7px #001135;
font-size: 40px;
}
.cube {
position: relative;
margin: 0px auto;
margin-top: 9%;
margin-left: 42%;
width: 200px;
height: 200px;
transform: rotateX(-30deg) rotateY(-80deg);
transform-style: preserve-3d;
animation: rotate 15s infinite;
}
.cube .outer-cube,
.cube .inner-cube {
transform-style: preserve-3d;
}
/* 旋转立方体 */
@keyframes rotate {
from {
transform: rotateX(0deg) rotateY(0deg);
}
to {