码迷,mamicode.com
首页 > 其他好文 > 详细

让图标转起来

时间:2015-01-22 00:05:30      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

<!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

 

让图标转起来

标签:

原文地址:http://www.cnblogs.com/goodspeed/p/4240367.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!