feat: scroll top button

This commit is contained in:
2025-11-15 11:17:27 +01:00
parent 448fe54e82
commit 2c039ff661
3 changed files with 78 additions and 0 deletions

View File

@@ -635,6 +635,49 @@ body {
}
}
/* Scroll to Top Button */
.scroll-to-top-btn {
position: fixed;
bottom: 2rem;
right: 2rem;
width: 50px;
height: 50px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
transition: all 0.3s ease;
opacity: 0;
visibility: hidden;
transform: translateY(20px);
z-index: 999;
}
.scroll-to-top-btn.show {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.scroll-to-top-btn:hover {
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}
.scroll-to-top-btn:active {
transform: translateY(-1px);
}
.scroll-to-top-btn svg {
width: 24px;
height: 24px;
}
@media (max-width: 400px) {
.header-right {
flex-direction: column;
@@ -649,5 +692,12 @@ body {
width: 100%;
justify-content: flex-start;
}
.scroll-to-top-btn {
bottom: 1.5rem;
right: 1.5rem;
width: 45px;
height: 45px;
}
}