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

呼啦圈(keyframes和transform结合)

时间:2017-09-15 21:38:19      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:oct   ext   back   ansi   text   col   animation   doctype   frame   

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
        /*定义动画*/
        @keyframes zd{
        /*关键帧     自定义的动画名称*/
            /**/
            0%{
                transform: rotate(0deg);
            }
            10%{
                transform: rotate(70deg);
            }
            /**/
            100%{
                transform: rotate(360deg);
            }
        }
            .a{
                height: 200px;
                width: 200px;
                border-style: solid;
                border-width: 20px;
                border-color: red yellow green blue;
                border-radius: 50%;  
                /*transition: 2s;*/
            }
            .a:hover{
                /*transform: rotate(360deg);*/
                animation: zd 1s infinite linear;
            /*动画 动画名称   动画执行一次所需时间  执行次数 匀速*/
            }
        </style>
    </head>
    <body>
        <div class="a"></div>
    </body>
</html>

源码禁止盗用!转载请注明出处!!!

呼啦圈(keyframes和transform结合)

标签:oct   ext   back   ansi   text   col   animation   doctype   frame   

原文地址:http://www.cnblogs.com/lhl66/p/7528368.html

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