CSS3添加动态圆点

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>CSS3添加动态圆点</title>

    <style>

        @-webkit-keyframes mars3d-mapAni {

    0% {

        width: 0;

        height: 0;

        opacity: 1;

        filter: alpha(opacity=1)

    }

 

    25% {

        width: 12px;

        height: 12px;

        opacity: .7;

        filter: alpha(opacity=70)

    }

 

    50% {

        width: 20px;

        height: 20px;

        opacity: .5;

        filter: alpha(opacity=50)

    }

 

    75% {

        width: 30px;

        height: 30px;

        opacity: .2;

        filter: alpha(opacity=20)

    }

 

    to {

        width: 40px;

        height: 40px;

        opacity: 0;

        filter: alpha(opacity=0)

    }

}

 

@-moz-keyframes mars3d-mapAni {

    0% {

        width: 0;

        height: 0;

        opacity: 1;

        filter: alpha(opacity=1)

    }

 

    25% {

        width: 12px;

        height: 12px;

        opacity: .7;

        filter: alpha(opacity=70)

    }

 

    50% {

        width: 20px;

        height: 20px;

        opacity: .5;

        filter: alpha(opacity=50)

    }

 

    75% {

        width: 30px;

        height: 30px;

        opacity: .2;

        filter: alpha(opacity=20)

    }

 

    to {

        width: 40px;

        height: 40px;

        opacity: 0;

        filter: alpha(opacity=0)

    }

}

 

@-o-keyframes mars3d-mapAni {

    0% {

        width: 0;

        height: 0;

        opacity: 1;

        filter: alpha(opacity=1)

    }

 

    25% {

        width: 12px;

        height: 12px;

        opacity: .7;

        filter: alpha(opacity=70)

    }

 

    50% {

        width: 20px;

        height: 20px;

        opacity: .5;

        filter: alpha(opacity=50)

    }

 

    75% {

        width: 30px;

        height: 30px;

        opacity: .2;

        filter: alpha(opacity=20)

    }

 

    to {

        width: 40px;

        height: 40px;

        opacity: 0;

        filter: alpha(opacity=0)

    }

}

 

@-ms-keyframes mars3d-mapAni {

    0% {

        width: 0;

        height: 0;

        opacity: 1;

        filter: alpha(opacity=1)

    }

 

    25% {

        width: 12px;

        height: 12px;

        opacity: .7;

        filter: alpha(opacity=70)

    }

 

    50% {

        width: 20px;

        height: 20px;

        opacity: .5;

        filter: alpha(opacity=50)

    }

 

    75% {

        width: 30px;

        height: 30px;

        opacity: .2;

        filter: alpha(opacity=20)

    }

 

    to {

        width: 40px;

        height: 40px;

        opacity: 0;

        filter: alpha(opacity=0)

    }

}

 

@keyframes mars3d-mapAni {

    0% {

        width: 0;

        height: 0;

        opacity: 1;

        filter: alpha(opacity=1)

    }

 

    25% {

        width: 12px;

        height: 12px;

        opacity: .7;

        filter: alpha(opacity=70)

    }

 

    50% {

        width: 20px;

        height: 20px;

        opacity: .5;

        filter: alpha(opacity=50)

    }

 

    75% {

        width: 30px;

        height: 30px;

        opacity: .2;

        filter: alpha(opacity=20)

    }

 

    to {

        width: 40px;

        height: 40px;

        opacity: 0;

        filter: alpha(opacity=0)

    }

}

        .mars3d-animation-point {

            width: 20px;

            height: 20px;

            border-radius: 50%;

            border: 2px solid hsla(0,0%,100%,.5);

            cursor: pointer;

            color: #0ff;

            background: currentColor;

            z-index: 3;

            left: 50%;

            top: 50%;

            -webkit-transform: translate(-50%,-50%);

            -moz-transform: translate(-50%,-50%);

            -o-transform: translate(-50%,-50%);

            -ms-transform: translate(-50%,-50%);

            transform: translate(-50%,-50%);

            box-shadow: 0 0 2em currentColor,0 0 .5em currentColor;

            position: absolute;

            /* font-size: 20px; */

        }

        .mars3d-animation-point:after, .mars3d-animation-point:before {

            border: 2px solid;

            -webkit-animation: mars3d-mapAni 1s ease infinite;

            -moz-animation: mars3d-mapAni 1s ease infinite;

            -o-animation: mars3d-mapAni 1s ease infinite;

            -ms-animation: mars3d-mapAni 1s ease infinite;

            animation: mars3d-mapAni 1s ease infinite;

        }

        .mars3d-animation-point:after, .mars3d-animation-point:before, .mars3d-animation-point p:after, .mars3d-animation-point p:before {

            content: "";

            position: absolute;

            width: 100%;

            height: 100%;

            left: 50%;

            top: 50%;

            border-radius: 50%;

            -webkit-transform: translate(-50%,-50%);

            -moz-transform: translate(-50%,-50%);

            -o-transform: translate(-50%,-50%);

            -ms-transform: translate(-50%,-50%);

            transform: translate(-50%,-50%);

            /* font-size: 20px; */

        }

        .mars3d-animation-point p {

            position: absolute;

            left: 50%;

            top: 50%;

            width: 0;

            height: 0;

            border-radius: 50%;

            -webkit-transform: translate(-50%,-50%);

            -moz-transform: translate(-50%,-50%);

            -o-transform: translate(-50%,-50%);

            -ms-transform: translate(-50%,-50%);

            transform: translate(-50%,-50%);

            -webkit-animation: mars3d-mapAni 2s ease infinite;

            -moz-animation: mars3d-mapAni 2s ease infinite;

            -o-animation: mars3d-mapAni 2s ease infinite;

            -ms-animation: mars3d-mapAni 2s ease infinite;

            animation: mars3d-mapAni 2s ease infinite;

        }

 

    </style>

</head>

<body>

    <div style="position: absolute; left: 0px; top: 0px; pointer-events: all; transform: matrix(1, 0, 0, 1, 391.351, 581.323); transform-origin: left bottom 0px;">

        <div class="mars3d-animation-point" style="color:#f33349;">

            <p></p>

        </div>

    </div>

</body>

</html>

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IT侠客行

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值