feat: scroll top button
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user