你好! 这是一段用HTML写的3D动态圣诞树的代码:

<!DOCTYPE html><html><head><style>.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); }}</style></head><body><div class="christmas-tree"><div class="trunk"></div><div class="tree"></div></div></body></html>

这段代码会创建一个500×500像素的3D圣诞树,树干是棕色的,树枝是绿色的。树干和树枝会不断旋转360度,形成动画效果。希望这能帮到你!