简单的图片旋转的css
html代码和css如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img src="https://zzk.cnblogs.com/images/logo.png" alt="" srcset="" class="xuanzhuan">
<style>
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.xuanzhuan {
animation: rotate 2s linear infinite;
}
</style>
</body>
</html>