x
1
<style>
2
.ripple {
3
position: relative;
4
overflow: hidden;
5
transform: translate3d(0, 0, 0)
6
}
7
8
.ripple:after {
9
content: "";
10
display: block;
11
position: absolute;
12
width: 100%;
13
height: 100%;
14
top: 0;
15
left: 0;
16
pointer-events: none;
17
background-image: radial-gradient(circle, #000 10%, transparent 10.01%);
18
background-repeat: no-repeat;
19
background-position: 50%;
20
transform: scale(10, 10);
21
opacity: 0;
22
transition: transform .5s, opacity 1s
23
}
24
25
.ripple:active:after {
26
transform: scale(0, 0);
27
opacity: .2;
28
transition: 0s
29
}
30
31
.btn {
32
display: inline-block;
33
padding: 6px 12px;
34
margin-bottom: 0;
35
font-size: 14px;
36
font-weight: normal;
37
line-height: 1.42857143;
38
text-align: center;
39
white-space: nowrap;
40
vertical-align: middle;
41
-ms-touch-action: manipulation;
42
touch-action: manipulation;
43
cursor: pointer;
44
-webkit-user-select: none;
45
-moz-user-select: none;
46
-ms-user-select: none;