码迷,mamicode.com
首页 > Web开发 > 详细

css3 循环旋转

时间:2015-03-19 10:03:07      阅读:264      评论:0      收藏:0      [点我收藏+]

标签:

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body{
    padding: 100px;
    background-color: #000;
}
.box{
    width: 200px;
    height: 200px;
    background-color: #eee;
    position: relative;
    border-radius: 50%;
    -webkit-animation: wheel-rotate 2s linear infinite;
    -moz-animation: wheel-rotate 2s linear infinite;
    animation: wheel-rotate 2s linear infinite;
}
@-webkit-keyframes wheel-rotate {
    from{
        -webkit-transform: rotate(0deg);
    }
    to{
        -webkit-transform: rotate(360deg);
    }
}
@keyframes wheel-rotate {
    from{
        transform: rotate(0deg);
    }
    to{
        transform: rotate(360deg);
    }
}
@-moz-keyframes wheel-rotate {
    from{
        -moz-transform: rotate(0deg);
    }
    to{
        -moz-transform: rotate(360deg);
    }
}
.box:after{
    display: block;
    content: "";
    width: 10px;
    height: 10px;
    position: absolute;
    left: 30px;
    top: 30px;
    background-color: blue;
}
</style>
</head>
<body>
    <div class="box"></div>
</body>
</html>

 

技术分享

css3 循环旋转

标签:

原文地址:http://www.cnblogs.com/baixc/p/4349520.html

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