案例-热点图(CSS3)

这个案例展示了如何利用CSS3实现一个动态的热点图,包括背景图片、城市位置标记和多个脉冲动画效果,用于模拟地理热点。通过绝对定位和动画关键帧,实现了红点从中心向外扩散的视觉效果,呈现了类似热度分布的动态展示。
摘要由CSDN通过智能技术生成

案例-热点图(CSS3)

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>案例-热点图</title>
    <style>
        body {
            background-color: #333;
        }

        .map {
            position: relative;
            width: 600px;
            height: 600px;
            background: url(map.png) no-repeat;
            margin: 0 auto;
        }

        .city {
            position: absolute;
            top: 120px;
            right: 291px;
            color: black;
            font-size: 14px;
        }

        .dotted {
            width: 8px;
            height: 8px;
            background-color: red;
            border-radius: 50%;
        }

        .city div[class^=pulse] {
            /* 保证我们小波纹在父盒子里面水平垂直居中  放大之后就会向四周发散  */
            position: absolute;
            top: 84%;
            right: 67%;
            transform: translate(-0%, -50%);
            width: 8px;
            height: 8px;
            box-shadow: 0 0 10px red;

            border-radius: 50%;
            animation: pulse 2s linear infinite;
        }

        .city div.pulse2 {
            animation-delay: 0.4s;
        }

        .city div.pulse3 {
            animation-delay: 0.8s;
        }

        @keyframes pulse {
            0% {}

            70% {
                /*  width: 40px; */
                /*  height: 40px; */
                transform: scale(5);
                opacity: 1;
            }

            100% {
                width: 70px;
                height: 70px;
                opacity: 0;
            }
        }
    </style>
</head>

<body>
    <div class="map">

        <div class="city">北京
            <div class="dotted">
            </div>
            <div class="pulse1"></div>
            <div class="pulse2"></div>
            <div class="pulse3"></div>
        </div>

    </div>
</body>

</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

不易撞的网名

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

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

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

打赏作者

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

抵扣说明:

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

余额充值