mirror of
https://github.com/Alvin-Zilverstand/challenge-11.git
synced 2026-11-22 21:33:02 +01:00
Enhance navbar design and functionality in index.html, styles.css, and script.js. Implement a glass effect for the navbar, add animated hover effects for navigation links, and introduce a scroll effect that changes the navbar's appearance on scroll. Update styles for improved responsiveness and visual appeal.
This commit is contained in:
1 parent
1b0f0ca1a6
commit
2a9e57bb5d
3 files changed
+147
-9
No files matched your search
@@ -209,4 +209,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Navbar scroll effect
|
||||
const navbar = document.querySelector('.navbar');
|
||||
window.addEventListener('scroll', () => {
|
||||
if (window.scrollY > 50) {
|
||||
navbar.classList.add('scrolled');
|
||||
} else {
|
||||
navbar.classList.remove('scrolled');
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user