IT俱乐部 CSS css3实现类似地图定位循环扩散光圈效果(最新推荐)

css3实现类似地图定位循环扩散光圈效果(最新推荐)

1.效果图,重点opacity,animation,transform:scale

2.html

1
2
3
4
5
6
7
8
9
<div class="icon-warnCom">
        <i class="dot"></i><i class="pulse"></i>
</div>
    <div class="icon-warnCom1">
        <i class="dot"></i><i class="pulse"></i>
</div>
    <div class="icon-warnCom2">
        <i class="dot"></i><i class="pulse"></i>
</div>

3.css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
body {
           width: 100%;
           height: 100%;
           background-color: black;
       }
       @keyframes warn {
           0% {
               transform: scale(0);
               opacity: 0.0;
           }
           25% {
               transform: scale(0);
               opacity: 0.1;
           }
           50% {
               transform: scale(0.1);
               opacity: 0.3;
           }
           75% {
               transform: scale(0.2);
               opacity: 0.5;
           }
           100% {
               transform: scale(0.3);
               opacity: 0.0;
           }
       }
       .icon-warnCom {
           position: absolute;
           width: 12px;
           height: 12px;
           background-color: #ffd803;
           border-radius: 100%;
           top: 100px;
           left: 100px;
       }
       .icon-warns {
           position: relative;
           width: 100%;
           height: 100%;
           display: block;
       }
       /* 保持大小不变的小圆圈  */
       .dot {
           position: absolute;
           left: -44px;
           top: -44px;
           width: 60px;
           height: 60px;
           -webkit-border-radius: 100;
           -moz-border-radius: 100;
           border: 20px solid #f6c100;
           border-radius: 100%;
           z-index: 2;
           opacity: 0;
           -webkit-animation: warn 2.5s ease-out;
           -moz-animation: warn 2.5s ease-out;
           animation: warn 2.5s ease-out;
           -webkit-animation-iteration-count: infinite;
           -moz-animation-iteration-count: infinite;
           animation-iteration-count: infinite;
       }
       /* 产生动画(向外扩散变大)的圆圈  */
       .pulse {
           position: absolute;
           left: -44px;
           top: -44px;
           width: 60px;
           height: 60px;
           border: 20px solid #f6c100;
           -webkit-border-radius: 100%;
           -moz-border-radius: 100%;
           border-radius: 100%;
           z-index: 1;
           opacity: 1;
           -webkit-animation: warn 1.5s ease-out;
           -moz-animation: warn 1.5s ease-out;
           animation: warn 1.5s ease-out;
           -webkit-animation-iteration-count: infinite;
           -moz-animation-iteration-count: infinite;
           animation-iteration-count: infinite;
       }
       .icon-warnCom1 {
           position: absolute;
           width: 12px;
           height: 12px;
           background-color: #ffd803;
           border-radius: 100%;
           top: 50px;
           left: 50px;
       }
       .icon-warnCom2 {
           position: absolute;
           width: 12px;
           height: 12px;
           background-color: #ffd803;
           border-radius: 100%;
           top: 100px;
           left: 50px;
       }

到此这篇关于css3实现类似地图定位循环扩散光圈效果的文章就介绍到这了,更多相关css3地图定位循环扩散光圈内容请搜索IT俱乐部以前的文章或继续浏览下面的相关文章,希望大家以后多多支持IT俱乐部!

本文收集自网络,不代表IT俱乐部立场,转载请注明出处。https://www.2it.club/navsub/css/13684.html
上一篇
下一篇
联系我们

联系我们

在线咨询: QQ交谈

邮箱: 1120393934@qq.com

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部