美文网首页前端是万能的
css 实现图片旋转

css 实现图片旋转

作者: 肆意木 | 来源:发表于2019-03-04 20:32 被阅读1次

源代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .rotation {
            -webkit-transform: rotate(360deg);
            animation: rotation 8s linear infinite;
            -moz-animation: rotation 8s linear infinite;
            -webkit-animation: rotation 8s linear infinite;
            -o-animation: rotation 8s linear infinite;
        }
        @-webkit-keyframes rotation {
            from {
            -webkit-transform: rotate(0deg);
            }
            to {
                -webkit-transform: rotate(360deg);
            }
        }
    </style>
</head>

<body>
<div class="logo">
    <img class="rotation" src="http://cdn.jingqueyun.com/turntable/image/theme/theme2/turntable-outer-bg2.png"/>
</div>
</body>
</html>

相关文章

网友评论

    本文标题:css 实现图片旋转

    本文链接:https://www.haomeiwen.com/subject/ynjwuqtx.html