-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbutton.css
49 lines (48 loc) · 880 Bytes
/
button.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
@keyframes wave{
20% {
transform: scale(0.2);
opacity: 0.8;
}
40% {
transform: scale(0.4);
opacity: 0.6;
}
60% {
transform: scale(0.6);
opacity: 0.4;
}
80% {
transform: scale(0.8);
opacity: 0.2;
}
100% {
transform: scale(1);
opacity: 0;
}
}
.button {
overflow: hidden;
position: relative;
border:2px solid #fff;
background:#2894FF;
border-radius: 10px;
width: 200px;
height: 50px;
}
.wave {
border-radius: 50%;
position: absolute;
top:50%;
margin-top: -200px;
left: 50%;
margin-left: -200px;
background: #fff;
width: 400px;
height: 400px;
transform: scale(0.01);
opacity: 0;
}
/* 悬浮替代点击 */
.button:hover .wave{
animation: wave linear 1s;
}