咕嘟白的iPhone:
.christmas-tree {
height: 500px;
width: 500px;
perspective: 1000px;
}
.christmas-tree .trunk {
height: 50%;
width: 20%;
background-color: brown;
transform-origin: bottom;
animation: rotateTrunk 10s linear infinite;
}
.christmas-tree .tree {
height: 50%;
width: 100%;
background-color: green;
transform-origin: bottom;
animation: rotateTree 10s linear infinite;
}
@keyframes rotateTrunk {
from { transform: rotateX(0deg); }
to { transform: rotateX(360deg); }
}
@keyframes rotateTree {
from { transform: rotateY(0deg); }
to { transform: rotateY(360deg); }
}
最新发布