旋转的彩色球体

给每一个圆的旋转动画设置延迟时间,使得球体在旋转的同时像彩色
在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        body{
            overflow: hidden;  /*溢出隐藏*/
        }
        .circle{      /*设置圆的大小颜色位置*/
            width:150px;
            height: 150px;
            border: 1px solid red;
            margin: auto;
            border-radius: 50%;
            position: absolute;
            left:0px;
            top:0px;
            right:0px;
            bottom:0px;
        
            
        }

        @keyframes run{    /*创建动画*/
            0%{
                transform: rotate3d(0,0,0,0deg);
                border-color: tomato;
            }
            25%{
                border-color:green;
            }
            50%{
                border-color: blue;
            }
            75%{
                border-color: yellow;
            }
            100%{
                border-color: orangered;
                transform: rotate3d(1,1,1,360deg);
        }
        }
    </style>
</head>
<body>
     
            <!-- 动画名称  完成动画的时间(s/ms) 曲线速度  延迟时间  动画播放的次数 -->
            <div class="circle" style="animation: run 2s linear 0.1s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.2s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.3s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.4s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.5s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.6s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.7s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.8s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 0.9s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 1s infinite;">  </div>
            <div class="circle" style="animation: run 2s linear 1.2s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 1.3s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 1.4s infinite;"></div>
            <div class="circle" style="animation: run 2s linear 1.5s infinite;"></div>



</body>
</html>

transform 3D

transform:rotateX(); 前后旋转

transform:rotateY() 左右旋转

transform:rotateZ(); 平面旋转

transform:rotate3d(x,y,z,deg); x,y,z分别代表xyz轴是否旋转

0不旋转,1旋转

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值