CSS 实现硬币旋转
.coin { width: 100px; height: 100px; margin: 100px; animation: rotateCoin 3s linear; animation-iteration-count: 3; background-color: goldenrod; border-radius: 50%; } .coin:hover { animation-play-state: paused; } @keyframes rotateCoin { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }