首页 > Web开发 > 详细

css3实现倾斜转动的转盘

时间:2019-05-08 10:59:09      阅读:298      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 

 

 

HTML代码:

<div class="r-1">a</div>
<div class="r-2">a</div>

  

CSS代码:

        .r-1{
            border: 1px solid red;
            text-align: center;color: #ffffff;line-height: 500px;vertical-align: middle;font-size: 50px;;
            position: absolute;
            width: 500px;height: 500px;
            top:0px;left:620px;
            background-image: url("resoureces/a.png");
            background-size: 100% 100%;
            background-repeat: no-repeat;

            animation: circleSmall 10s linear infinite;
        }

.r-2{
    border: 1px solid red;
    text-align: center;color: #ffffff;line-height: 500px;vertical-align: middle;font-size: 50px;;
    position: absolute;
    width: 500px;height: 500px;
    top:0px;left:20px;
    background-image: url("resoureces/a.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;

    animation: circleSmall2 10s linear infinite;
}
        /*旋转动画*/

        @-webkit-keyframes circleSmall{

            0%{
                transform: rotateX(30deg) rotateY(-10deg) rotateZ(0deg);
            }
            100%{
                transform: rotateX(30deg) rotateY(-10deg) rotateZ(360deg);
            }
        }

@-webkit-keyframes circleSmall2{
     0% {
         -webkit-transform: rotate3d(0,0,.2,0deg);
     }

     100% {
         -webkit-transform: rotate3d(0,0,.2,360deg);
     }
}

  

css3实现倾斜转动的转盘

原文:https://www.cnblogs.com/pangchunlei/p/10830356.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!