-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathback-to-top.html
More file actions
415 lines (360 loc) · 17.9 KB
/
Copy pathback-to-top.html
File metadata and controls
415 lines (360 loc) · 17.9 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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html>
<html lang="en" itemscope itemtype="https://schema.org/WebPage">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- SEO Meta Tags -->
<title>Back2Top.fun - Professional Back to Top Button | Enhance User Experience</title>
<meta name="description" content="Professional, customizable back-to-top button with smooth animations. Improve your website's user experience with our lightweight, responsive scroll-to-top solution.">
<meta name="keywords" content="back to top button, scroll to top, user experience, web development, javascript, responsive design, smooth scroll, website navigation">
<meta name="author" content="Back2Top.fun">
<meta name="robots" content="index, follow">
<meta name="language" content="English">
<meta name="revisit-after" content="7 days">
<!-- Geographic Meta Tags -->
<meta name="geo.region" content="US">
<meta name="geo.placename" content="United States">
<meta name="geo.position" content="39.8283;-98.5795">
<meta name="ICBM" content="39.8283, -98.5795">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://back2top.fun/">
<meta property="og:title" content="Back2Top.fun - Professional Back to Top Button">
<meta property="og:description" content="Enhance your website's user experience with our customizable, lightweight back-to-top button. Features smooth animations and responsive design.">
<meta property="og:image" content="https://back2top.fun/og-image.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:site_name" content="Back2Top.fun">
<meta property="og:locale" content="en_US">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://back2top.fun/">
<meta name="twitter:title" content="Back2Top.fun - Professional Back to Top Button">
<meta name="twitter:description" content="Enhance your website's user experience with our customizable, lightweight back-to-top button.">
<meta name="twitter:image" content="https://back2top.fun/twitter-image.jpg">
<meta name="twitter:creator" content="@back2top">
<meta name="twitter:site" content="@back2top">
<!-- LinkedIn -->
<meta property="og:image:alt" content="Back2Top.fun - Professional Back to Top Button Demo">
<!-- Schema.org Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Back2Top.fun",
"description": "Professional, customizable back-to-top button with smooth animations for enhanced user experience",
"url": "https://back2top.fun",
"applicationCategory": "WebApplication",
"operatingSystem": "Any",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"author": {
"@type": "Organization",
"name": "Back2Top.fun",
"url": "https://back2top.fun"
},
"datePublished": "2025-10-04T13:58:14.821Z",
"dateModified": "2025-10-04T13:58:14.821Z",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "127"
}
}
</script>
<!-- Favicon and Icons -->
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<!-- Preconnect for Performance -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<style>
.back-to-top-btn {
position: fixed;
bottom: 20px; right: 20px;
width: 56px;
height: 56px;
border: none;
cursor: pointer;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border-radius: 50%;
background: linear-gradient(135deg, #6366f1, #ec4899); color: white;
}
.back-to-top-btn.visible {
opacity: 1;
visibility: visible;
}
.back-to-top-btn:hover {
transform: scale(1.1);
}
.back-to-top-btn svg {
width: 22px;
height: 22px;
fill: currentColor;
}
/* CTA Button Styles */
.cta-section {
text-align: center;
margin: 60px 0;
padding: 40px 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 16px;
color: white;
}
.cta-button {
display: inline-block;
margin: 10px;
padding: 12px 24px;
background: rgba(255, 255, 255, 0.2);
color: white;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.3);
}
.cta-button:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
/* Mobile Responsive Design */
@media (max-width: 768px) {
body {
font-size: 14px;
}
main {
padding: 30px 15px !important;
}
.cta-section {
margin: 40px 0;
padding: 30px 15px;
}
.cta-button {
display: block;
margin: 10px auto;
max-width: 250px;
text-align: center;
}
.back-to-top-btn {
width: 48px !important;
height: 48px !important;
}
.back-to-top-btn svg {
width: 19px !important;
height: 19px !important;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.5rem;
}
h3 {
font-size: 1.2rem;
}
}
@media (max-width: 480px) {
main {
padding: 20px 10px !important;
}
.cta-section {
margin: 30px 0;
padding: 20px 10px;
}
.back-to-top-btn {
width: 40px !important;
height: 40px !important;
}
.back-to-top-btn svg {
width: 16px !important;
height: 16px !important;
}
}
/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.back-to-top-btn {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
body {
background-color: #1a1a1a;
color: #e0e0e0;
}
section {
background: #2a2a2a !important;
color: #e0e0e0;
}
.cta-section {
background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}
}
/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
.back-to-top-btn,
.cta-button {
transition: none;
}
.back-to-top-btn:hover {
transform: none;
}
.cta-button:hover {
transform: none;
}
}
/* Print Styles */
@media print {
.back-to-top-btn,
.button-container,
.cta-section {
display: none !important;
}
}
/* CTA Button Styles */
.cta-button {
display: inline-block;
padding: 12px 24px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
transition: all 0.3s ease;
margin: 10px;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.cta-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.cta-section {
text-align: center;
padding: 60px 20px;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
margin: 40px 0;
}
</style>
</head>
<body>
<!-- Demo content to test scrolling -->
<header style="height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 2rem; text-align: center;">
<div>
<h1>Scroll Down to Test</h1>
<p style="margin-top: 20px; font-size: 1rem;">The back-to-top button will appear after scrolling 100px</p>
</div>
</header>
<main style="padding: 50px 20px; max-width: 800px; margin: 0 auto; line-height: 1.6;">
<h2>Professional Back-to-Top Button Demo</h2>
<p>Experience our customizable, lightweight back-to-top button with smooth animations. This demo showcases the professional-grade solution that enhances user experience across all devices.</p>
<!-- CTA Section -->
<div class="cta-section">
<h2 style="margin-bottom: 20px; color: #333;">Ready to Enhance Your Website?</h2>
<p style="margin-bottom: 30px; color: #666; font-size: 1.1rem;">Get started with Back2Top.fun today and improve your user experience instantly!</p>
<a href="https://back2top.fun/get-started" class="cta-button" onclick="gtag('event', 'click', {'event_category': 'CTA', 'event_label': 'Get Started'});">
🚀 Get Started Free
</a>
<a href="https://back2top.fun/examples" class="cta-button" onclick="gtag('event', 'click', {'event_category': 'CTA', 'event_label': 'Examples'});">
🎨 See More Examples
</a>
</div>
<h3>Key Features</h3>
<ul style="margin: 20px 0; padding-left: 20px;">
<li>🎯 Highly customizable appearance and behavior</li>
<li>📱 Fully responsive and mobile-optimized</li>
<li>⚡ Lightweight with smooth animations</li>
<li>🎨 Multiple animation styles and effects</li>
<li>🔧 Easy integration with any website</li>
<li>♿ Accessibility-friendly design</li>
</ul>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 1</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 2</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 3</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 4</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 5</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 6</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 7</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<section style="margin: 40px 0; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<h3>Feature Showcase 8</h3>
<p>Back2Top.fun offers professional-grade functionality that enhances user navigation. Our solution provides smooth scrolling, customizable animations, and responsive design that works seamlessly across all devices and browsers.</p>
<p>Whether you're building a corporate website, e-commerce platform, or personal blog, Back2Top.fun adapts to your design requirements while maintaining optimal performance and accessibility standards.</p>
</section>
<!-- Final CTA Section -->
<div class="cta-section">
<h2 style="margin-bottom: 20px; color: #333;">Join Thousands of Satisfied Users</h2>
<p style="margin-bottom: 30px; color: #666; font-size: 1.1rem;">Start improving your website's user experience today with Back2Top.fun!</p>
</div>
</main>
<footer style="height: 50vh; background: #333; color: white; display: flex; align-items: center; justify-content: center;">
<p>End of page - Test the back-to-top button!</p>
</footer>
<!-- Back to Top Button(s) -->
<button id="backToTopBtn" class="back-to-top-btn" title="Back to top">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<svg viewBox="0 0 24 24"><path d="m18 15-6-6-6 6"/></svg>
</svg>
</button>
<script>
const backToTopBtn = document.getElementById('backToTopBtn');
function updateButtonVisibility() {
if (window.pageYOffset > 100) {
backToTopBtn.classList.add('visible');
} else {
backToTopBtn.classList.remove('visible');
}
}
window.addEventListener('scroll', updateButtonVisibility);
backToTopBtn.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
// Initial check
updateButtonVisibility();
</script>
</body>
</html>