-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimated-button.html
102 lines (102 loc) · 1.96 KB
/
animated-button.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Animated Button</title>
<style>
.button {
padding: 15px 25px;
font-size: 24px;
text-align: center;
cursor: pointer;
outline: none;
color: #fff;
background-color: #00b867;
border: none;
border-radius: 15px;
box-shadow: 0 9px #999;
}
.button:hover {background-color: #3d8e7b}
.button:active {
background-color: #3e8e41;
box-shadow: 0 5px #666;
transform: translateY(5px);
}
.button1 {
border-radius: 4px;
background-color: #00b867;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 28px;
padding: 20px;
width: 200px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}
.button1 span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
.button1 span:after {
content: '»';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.button1:hover span {
padding-right: 25px;
}
.button1:hover span:after {
opacity: 1;
right: 0;
}
.button2 {
position: relative;
background-color: #00b867;
border: none;
font-size: 28px;
color: #FFFFFF;
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.button2:after {
content: "";
background: #90EE90;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.8s
}
.button2:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
</style>
</head>
<body>
<h2>Animated Buttons - Pressed Effect </h2>
<button class="button">Click Here</button>
<h2>Animated Button - Ripple Effect</h2>
<button class="button2">Click Here</button>
<h2>Animated Button</h2>
<button class="button1"><span>Hover Me </span></button>
</body>
</html>