Lab 37 Reflection Journal
For this lab we needed to create a sticky nav bar and add it to a webpage. A sticky nav bar is simply a nav bar which follows wherever the user goes on the page which is pretty convenient in order to navigate the page easier if it contains a lot of content. In order to complete the lab we needed to create a constant which would hold the nav bar as well as a function which when scrolled down the page the nav bar would then transform to a different type of way such as in the beginning it just sort a long rectangle with elements to navigate the page when you scroll more down then the nav bar will cover the top of the page and be bit bigger as well as the tex within the nav bar too.
Even though creating a fixed nav bar wasn't new to me since there is another way to do it using "Position: Fixed", even though this way is simpler the code gained from this lab allows us to manipulate the elements of the nav bar using a function to determine when the user scrolls down the page and then when reaching a certain point changing the CSS so it can adapt and be more easier for the user to use.

Comments
Post a Comment