-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
353 lines (318 loc) · 11.3 KB
/
index.html
File metadata and controls
353 lines (318 loc) · 11.3 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Button Animation Effects · refined palette</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(145deg, #0b1a33, #4a0f2b, #1b3b6f);
color: #f0f3fa;
min-height: 100vh;
padding: 40px 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
header {
text-align: center;
margin-bottom: 50px;
}
h1 {
font-size: 3rem;
margin-bottom: 10px;
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
background: linear-gradient(135deg, #ffe99c, #ffd5b5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.subtitle {
font-size: 1.2rem;
opacity: 0.95;
margin-bottom: 30px;
color: #cfdeff;
}
.buttons-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 30px;
margin-top: 40px;
}
.button-card {
background: rgba(20, 30, 45, 0.6);
backdrop-filter: blur(12px);
border-radius: 24px;
padding: 25px;
box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
transition: transform 0.2s ease, box-shadow 0.3s;
border: 1px solid rgba(255, 255, 255, 0.06);
}
.button-card:hover {
transform: translateY(-6px);
box-shadow: 0 28px 35px -8px rgba(0, 0, 0, 0.6);
}
.button-card h3 {
margin-bottom: 15px;
font-size: 1.6rem;
font-weight: 500;
color: #ffdb9d;
letter-spacing: 0.5px;
}
.button-card p {
color: #b7cbff;
margin-bottom: 20px;
font-size: 0.95rem;
line-height: 1.4;
}
.btn {
display: inline-block;
padding: 12px 30px;
margin: 10px 5px 5px 0;
border: none;
border-radius: 50px;
background: #333;
color: white;
font-size: 16px;
font-weight: 600;
cursor: pointer;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
text-decoration: none;
text-align: center;
box-shadow: 0 8px 16px -6px rgba(0, 0, 0, 0.4);
}
/* ----- FIXED COLOR THEMES – vibrant, consistent ----- */
/* Effect 1: Scale & Shadow – now bright coral to neon orange */
.effect-1 {
background: linear-gradient(145deg, #ff7163, #ff974f);
box-shadow: 0 6px 0 #b13b2e, 0 10px 20px rgba(255, 110, 80, 0.5);
}
.effect-1:hover {
transform: scale(1.06);
box-shadow: 0 8px 0 #b13b2e, 0 18px 30px rgba(255, 120, 80, 0.8);
}
/* Effect 2: Slide & Color Change – fresh ocean */
.effect-2 {
background: #2a9df4;
box-shadow: 0 5px 0 #0f5b9e;
}
.effect-2:hover {
background: #1b7bcb;
transform: translateX(10px);
box-shadow: 0 5px 0 #0a3f6f;
}
/* Effect 3: Rotate & Border – mint vibes */
.effect-3 {
background: transparent;
border: 2px solid #2ee5ac;
color: #2ee5ac;
box-shadow: none;
}
.effect-3:hover {
transform: rotate(4deg);
background: #2ee5ac;
color: #0a2920;
border-color: #2ee5ac;
box-shadow: 0 10px 18px -6px #2ee5ac80;
}
/* Effect 4: Pulse – rich purple, pulse color refined */
.effect-4 {
background: #c65bff;
box-shadow: 0 0 0 0 #c471ed;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 #d5a1ff; }
70% { box-shadow: 0 0 0 16px #d5a1ff00; transform: scale(1.05); }
100% { box-shadow: 0 0 0 0 #d5a1ff00; transform: scale(1); }
}
/* Effect 5: 3D Flip – use perspective with warm red */
.effect-5 {
background: #e3636b;
box-shadow: 0 6px 0 #9e313a;
transform-style: preserve-3d;
transition: transform 0.4s, background 0.2s;
}
.effect-5:hover {
transform: rotateY(180deg);
background: #c14b54;
box-shadow: 0 6px 0 #83262e;
}
/* Effect 6: Gradient Shift – fixed: deep violet → radiant magenta */
.effect-6 {
background: linear-gradient(90deg, #b066fe, #6f4df2, #ff7b9c);
background-size: 250% 100%;
background-position: 0% 0;
transition: background-position 0.5s ease, box-shadow 0.3s;
box-shadow: 0 5px 0 #4a2f9e;
}
.effect-6:hover {
background-position: 100% 0;
box-shadow: 0 8px 0 #2e1b7a, 0 12px 24px #b883ff80;
}
/* Effect 7: Border Animation – cobalt blue, crisp */
.effect-7 {
background: transparent;
color: #4dc3ff;
border: 2px solid #4dc3ff;
position: relative;
z-index: 1;
box-shadow: none;
}
.effect-7::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #4dc3ff;
z-index: -1;
transform: scaleX(0);
transform-origin: right;
transition: transform 0.35s ease;
border-radius: 50px;
}
.effect-7:hover {
color: #0b1f2b;
border-color: #4dc3ff;
}
.effect-7:hover::before {
transform: scaleX(1);
transform-origin: left;
}
/* Effect 8: Bounce – marigold energy */
.effect-8 {
background: #feb23b;
box-shadow: 0 6px 0 #b17717;
}
.effect-8:hover {
animation: bounce 0.6s;
}
@keyframes bounce {
0%, 20%, 60%, 100% { transform: translateY(0); }
40% { transform: translateY(-12px); }
80% { transform: translateY(-6px); }
}
/* Effect 9: Shake – teal with personality */
.effect-9 {
background: #1ab394;
box-shadow: 0 5px 0 #0d765f;
}
.effect-9:hover {
animation: shake 0.5s;
}
@keyframes shake {
0%, 100% { transform: translateX(0); }
20% { transform: translateX(-7px); }
40% { transform: translateX(7px); }
60% { transform: translateX(-4px); }
80% { transform: translateX(4px); }
}
/* Effect 10: Glow – radiant pink/orange with intense glow (fixed) */
.effect-10 {
background: linear-gradient(135deg, #ff758c, #ff9e5e);
box-shadow: 0 4px 0 #c1454b, 0 6px 16px #ff6f91;
}
.effect-10:hover {
box-shadow: 0 6px 0 #b13b44, 0 0 28px #ffa07a, 0 0 40px #ffb6c1;
transform: scale(1.02);
}
footer {
text-align: center;
margin-top: 70px;
padding: 20px;
font-size: 0.95rem;
opacity: 0.8;
border-top: 1px solid rgba(255,255,240,0.1);
color: #c5d5ff;
}
@media (max-width: 768px) {
.buttons-grid { grid-template-columns: 1fr; }
h1 { font-size: 2.3rem; }
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>CSS Button Animation Effects</h1>
<p class="subtitle">Hover any button – refined color palette & smooth transitions</p>
</header>
<div class="buttons-grid">
<!-- card 1: Scale & Shadow -->
<div class="button-card">
<h3>Scale & Shadow</h3>
<p>Bright coral gradient · grows with deeper shadow</p>
<a href="#" class="btn effect-1">Explore Now</a>
</div>
<!-- card 2: Slide & Color Change -->
<div class="button-card">
<h3>Slide & Color</h3>
<p>Ocean blue slides right, shifts tone</p>
<a href="#" class="btn effect-2">Get Started</a>
</div>
<!-- card 3: Rotate & Border -->
<div class="button-card">
<h3>Rotate & Border</h3>
<p>Mint border rotates & fills on hover</p>
<a href="#" class="btn effect-3">Join Today</a>
</div>
<!-- card 4: Pulse Animation -->
<div class="button-card">
<h3>Pulse</h3>
<p>Rich purple · smooth glowing pulse</p>
<a href="#" class="btn effect-4">Subscribe</a>
</div>
<!-- card 5: 3D Flip -->
<div class="button-card">
<h3>3D Flip</h3>
<p>Warm red · flips horizontally</p>
<a href="#" class="btn effect-5">Learn More</a>
</div>
<!-- card 6: Gradient Shift (FIXED vibrant) -->
<div class="button-card">
<h3>Gradient Shift</h3>
<p>Violet → pink → magenta · sweeping gradient</p>
<a href="#" class="btn effect-6">Discover</a>
</div>
<!-- card 7: Border Animation -->
<div class="button-card">
<h3>Border Animation</h3>
<p>Blue border fill from right</p>
<a href="#" class="btn effect-7">Sign Up</a>
</div>
<!-- card 8: Bounce Effect -->
<div class="button-card">
<h3>Bounce</h3>
<p>Golden yellow · playful bounce</p>
<a href="#" class="btn effect-8">Download</a>
</div>
<!-- card 9: Shake Animation -->
<div class="button-card">
<h3>Shake</h3>
<p>Bold teal · horizontal shake</p>
<a href="#" class="btn effect-9">Contact Us</a>
</div>
<!-- card 10: Glow Effect (FIXED intense glow) -->
<div class="button-card">
<h3>Glow</h3>
<p>Pink‑orange · intense dual glow on hover</p>
<a href="#" class="btn effect-10">Follow</a>
</div>
</div>
<footer>
<p>CSS Button Animation Effects · Refined color theme & fixed gradients, glow, and shadows</p>
</footer>
</div>
</body>
</html>