<style>
@keyframes spin {
to {
transform: rotate(1turn);
}
}
.avatar {
width: 200px;
height: 200px;
margin: 50px auto;
animation: spin 5s infinite linear;
transform-origin: 50% 150px;
background-color: orangered;
border-radius: 50%;
/* 150px = 路径的半径 */
}
.avatar>img {
width: 50px;
height: 50px;
padding: 30px;
border-radius: 50%;
animation: inherit;
animation-direction: reverse;
}
</style>
<body>
<div class="path">
<div class="avatar">
<img src="10.jfif" />
</div>
</div>
</body>