-
Notifications
You must be signed in to change notification settings - Fork 3
/
demo.html
78 lines (66 loc) · 1.36 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
<title>Demo Ripple Buttons</title>
<!-- Style -->
<link rel="stylesheet" type="text/css" href="ripple.css" />
<!-- Demo -->
<style>
/* variant */
.text {
border: none;
background-color: inherit;
padding: 14px 28px;
font-size: 16px;
cursor: pointer;
display: inline-block;
}
.text:hover {
background-color: #ddd;
}
/* outlined */
.outlined {
--ripple-background: black;
border: 2px solid black;
background-color: white;
color: red;
padding: 14px 28px;
font-size: 16px;
cursor: pointer;
}
/* Optional */
a {
--ripple-background: black;
--ripple-opacity: 0.1;
--ripple-duration: 900ms;
width: 106px;
height: 36px;
background: red;
text-align: center;
display: inline-block;
padding-top: 14px;
}
/* page layout */
.contained {
height: 50px;
width: 100px;
background-color: green;
}
.center {
margin: auto;
width: 60%;
border: 3px;
padding: 10px;
}
</style>
<div class="center">
<button effect="ripple" class="outlined">Button</button>
</div>
<div class="center">
<a href="#" effect="ripple">Button</a>
</div>
<div class="center">
<button effect="ripple" class="contained">Button</button>
</div>
<div class="center">
<button effect="ripple" class="text">Button</button>
</div>
<!-- Script -->
<script type="text/javascript" src="ripple.js"></script>