要使用 CSS 实现旋转动画,需要使用 transform 属性的 rotate 函数。该函数可以使元素沿着一个指定的轴旋转一定的角度。 你可以在元素的样式中添加如下代码: transform: rotate(45deg);