-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRipple_Effect_on_Click.html
44 lines (42 loc) · 1.08 KB
/
Ripple_Effect_on_Click.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ripple Effect Button</title>
<style>
.ripple-button {
font-size: 16px;
padding: 10px 20px;
background-color: #009688;
color: white;
border: none;
position: relative;
overflow: hidden;
border-radius: 5px;
}
.ripple-button::after {
content: '';
position: absolute;
width: 300%;
height: 300%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(255, 255, 255, 0.5);
opacity: 0;
transition: all 0.6s;
border-radius: 50%;
}
.ripple-button:active::after {
width: 0;
height: 0;
opacity: 1;
transition: 0s;
}
</style>
</head>
<body>
<button class="ripple-button">Ripple Button</button>
</body>
</html>