
This video explores using the Intersection Observer API to watch for an element leaving the page and then changing the style of a fixed navigation bar. GitHub repo: https://github.com/kevin-powell/navba... (includes start and finished versions) I set up some custom properties ahead of time to make the change really super simple, and then with the use of a little JavaScript to set up our observer, we can add (or remove) a class from our navigation when it reaches the right point on the screen. #JavaScript #IntersectionObserver #CSS --- Come and hangout, ask questions, suggest ideas, and meet some awesome people over in The Community: https://discord.gg/nTYCvrK I have a newsletter! https://www.kevinpowell.co/newsletter New to Sass, or want to step up your game with it? I've got a course just for you: https://www.kevinpowell.co/learn-sass --- My Code Editor: VS Code - https://code.visualstudio.com/ How my browser refreshes when I save: https://youtu.be/h24noHYsuGc --- Support me on Patreon: https://www.patreon.com/kevinpowell I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Instagram: https://www.instagram.com/kevinpowell... Twitter: https://twitter.com/KevinJPowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell
How to change your navigation style on scroll - YouTube |
606 Likes | 606 Dislikes |
8,798 views views | 75,677 followers |
Education | Upload TimePublished on 19 Jun 2019 |
Không có nhận xét nào:
Đăng nhận xét