纯css让背景图片不停围绕中心旋转

效果图:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .logo {
            text-align: center;
            margin-top: 100px;
        }
        @keyframes rotation {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }

        .Rotation {
            transform: rotate(360deg);
            animation: rotation 8s linear infinite;
           
        }

        .img {
            border-radius: 200px;
        }
    </style>
</head>

<body>
<div class="logo">
    <img class="Rotation img" src="http://cdn.jingqueyun.com/turntable/image/theme/theme2/turntable-outer-bg2.png" width="128" height="128"/>
</div>
</body>
</html>
 
原文地址:https://www.cnblogs.com/DZzzz/p/13278445.html