让图标转起来

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>Rock</title>
    <style type="text/css">
        body {
            background: #21122f;
        }
        .music {
            width: 64px;
            height: 64px;
            background: url(http://dn-h6app.qbox.me/data/case/youku/images/music.png) no-repeat center center;
            background-size: 100%;
        }
        .play {
            animation: r 1.2s linear infinite;
            -webkit-animation: r 1.2s linear infinite;
        }
        @keyframes r {
            0% {
                transform: rotate(0);
            }

            100% {
                transform: rotate(-360deg);
            }
        }

        @-webkit-keyframes r {
            0% {
                -webkit-transform: rotate(0);
            }

            100% {
                -webkit-transform: rotate(-360deg);
            }
        }
    </style>
</head>
<body>
    <div class="music play"></div>
</body>
</html>

 

Rock

 

你可能感兴趣的:(图标)