简单的图片旋转的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>
posted @ 2024-07-16 09:07  风意不止  阅读(5)  评论(0编辑  收藏  举报