css加载图标动画

<style>

        #f{

            width:500px;

            height:100px;

            border:1px solid green;

            font-size:0;

        }

        #f div{

            width:100px;

            height:100px;

            display:inline-block;

            position:relative;

            /* box-sizing:border-box; */

        }

        #f div::before{

            width: 50px;

            height: 50px;

            content:'';

            position:absolute;

            left:50%;

            top:50%;

            margin-left:-25px;

            margin-top:-25px;

            box-sizing:border-box;

            border:10px solid #ccc;

            border-radius:50%;

            animation:zqq 1s infinite linear;

        }

        #f div:nth-of-type(1)::before{

            border-style:dotted;

        }

        #f div:nth-of-type(2)::before{

            border-top-color:transparent;

            border-bottom-color:transparent;

        }

        #f div:nth-of-type(3)::before{

            border-top-color:transparent;

        }

        #f div:nth-of-type(4)::before{

            border-color:transparent;

            border-top-color:#ccc;

           

            animation-direction:reverse;

        }

        #f div:nth-of-type(4)::after{

            content:'';

            width:28px;

            height:28px;

            position:absolute;

            left:50%;

            top:50%;

            margin-left:-14px;

            margin-top:-14px;

            border:10px solid transparent;

            border-top-color:#ccc;

            border-radius:50%;

            box-sizing:border-box;

            animation:zqq 1s infinite linear;

        }

        #f div:nth-of-type(5)::before{

            border-left-style:none;

            border-top-color:transparent;

            animation-direction:reverse;

        }

        @keyframes zqq{

            from{

                transform:rotate(0deg);

            }

            to{

                transform:rotate(360deg);

            }

        }

    </style>

</head>

<body>

    <div id="f">

        <div></div>

        <div></div>

        <div></div>

        <div></div>

        <div></div>

    </div>

</body>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值