# 纯css3实现水波纹从中心向四周扩散动画

# 快速导航

# 示例效果

# 示例代码

<template>
    <div class="zanbtn-wrap">
        <div @click="handleClick('https://pay.aikelaidev.cn/paypage/?merchant=35bdYxSx7dCUrVUBqFQjdqqlzhWryCA7lqOn9VhakWHC')" class="zanBtn"></div>
    </div>
</template>
<script>
export default {
    name:'shuibowen',
    methods: {
        handleClick(openUrl) {
            window.open(openUrl, "_blank");
        }
    }

}
</script>
<style scoped>
@keyframes zanBtnAnimation {
  0% {
    box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 1px rgba(255, 37, 37, 0);
  }

  10% {
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0), 0px 0px 0px 2px rgba(255, 37, 37, 0.1);
  }

  20% {
    box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0), 0px 0px 0px 4px rgba(255, 37, 37, 0.2);
  }

  40% {
    box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 1px rgba(255, 37, 37, 0.1), 0px 0px 0px 4px rgba(0, 0, 0, 0), 0px 0px 0px 6px rgba(255, 37, 37, 0.3);
  }

  50% {
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0), 0px 0px 0px 3px rgba(255, 37, 37, 0.2), 0px 0px 0px 5px rgba(0, 0, 0, 0), 0px 0px 0px 8px rgba(255, 37, 37, 0.4);
  }

  60% {
    box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0), 0px 0px 0px 5px rgba(255, 37, 37, 0.3), 0px 0px 0px 6px rgba(0, 0, 0, 0), 0px 0px 0px 10px rgba(255, 37, 37, 0.5);
  }

  70% {
    box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0), 0px 0px 0px 6px rgba(255, 37, 37, 0.4), 0px 0px 0px 7px rgba(0, 0, 0, 0), 0px 0px 0px 11px rgba(255, 37, 37, 0.4);
  }

  80% {
    box-shadow: 0px 0px 0px 4px rgba(0, 0, 0, 0), 0px 0px 0px 7px rgba(255, 37, 37, 0.3), 0px 0px 0px 8px rgba(0, 0, 0, 0), 0px 0px 0px 12px rgba(255, 37, 37, 0.3);
  }

  90% {
    box-shadow: 0px 0px 0px 5px rgba(0, 0, 0, 0), 0px 0px 0px 6px rgba(255, 37, 37, 0.2), 0px 0px 0px 9px rgba(0, 0, 0, 0), 0px 0px 0px 13px rgba(255, 37, 37, 0.2);
  }

  100% {
    box-shadow: 0px 0px 0px 7px rgba(0, 0, 0, 0), 0px 0px 0px 7px rgba(255, 37, 37, 0.1), 0px 0px 0px 10px rgba(0, 0, 0, 0), 0px 0px 0px 14px rgba(255, 37, 37, 0);
  }
}

.zanbtn-wrap {
    text-align: center;
}

.zanBtn {
  width: 45px;
  height: 45px;
  padding: 10px;
  font-size: 14px;
  display: inline-block;
  text-align: center;
  background: rgba(255, 37, 37, 0.6);
  color: #fff;
  text-decoration: none;
  border-radius: 100%;
  -webkit-animation: zanBtnAnimation 2s alternate infinite;
  animation: zanBtnAnimation 2s alternate infinite;
  margin-top: 40px;
  margin-bottom: 40px;
  font-weight: 500;
  line-height: 45px;
  border: none;
  outline: none;
  cursor:pointer;
}
</style>

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

实现这个示例效果,主要是使用css3中的动画关键帧,以及box-shadow实现

白色

关注公众号

一个走心,有温度的号,同千万同行一起交流学习

加作者微信

扫二维码 备注 【加群】

扫码易购

福利推荐