-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.html
138 lines (125 loc) · 3.73 KB
/
demo.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!doctype html>
<html lang="en">
<head>
<title>Ripple Effect</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="theme-color" content="#000000">
<script src="ripple.js"></script>
</head>
<body>
<style>
body {
padding: 0;
margin: 0;
background: #FFF;
overflow-x: hidden;
cursor: default;
font-family: "Roboto", "BlinkMacSystemFont", "Arial", sans-serif;
-webkit-overflow-scrolling: touch;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
h1,
h2 {
text-align: center;
padding: 0;
margin: 0;
}
#card {
position: relative;
float: left;
height: 160px;
width: 320px;
margin: 16px calc(50% - 160px);
background: #FFF;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
border-radius: 2px;
cursor: pointer;
}
#button {
position: relative;
float: right;
height: 36px;
width: 160px;
padding: 0 16px;
margin: 16px calc(50% - 80px);
color: #757575;
font-size: 14px;
font-weight: 500;
line-height: 36px;
text-transform: uppercase;
background: #FFF;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
border-radius: 2px;
border: none;
outline: none;
cursor: pointer;
}
#fab {
position: relative;
float: left;
height: 56px;
width: 56px;
margin: 16px calc(50% - 28px);
background: #FFF;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
border-radius: 50%;
cursor: pointer;
}
#fab > svg {
position: absolute;
top: 16px;
left: 16px;
height: 24px;
width: 24px;
fill: #757575;
}
#icon {
position: relative;
float: left;
height: 40px;
width: 40px;
margin: 16px calc(50% - 20px);
border-radius: 50%;
cursor: pointer;
}
#icon > svg {
position: absolute;
top: 8px;
left: 8px;
height: 24px;
width: 24px;
fill: #757575;
}
</style>
<br>
<br>
<h1>Ripple effect demo</h1>
<br>
<br>
<h2>Ripple on cards</h2>
<div id="card" class="ripple"></div>
<h2>Ripple on buttons</h2>
<button id="button" class="ripple">Button</button>
<h2>Ripple on fabs</h2>
<div id="fab" class="ripple">
<svg viewBox="0 0 24 24">
<path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" />
</svg>
</div>
<h2>Ripple on icons</h2>
<div id="icon" class="ripple">
<svg viewBox="0 0 24 24">
<path d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" />
</svg>
</div>
</body>
</html>