A small example of styling a minorly interactive nav
bar
This is a snippet created to demonstrate how you might style and add a bit of interactivity (hover, JavaScript behavior on click
) to a basic and ugly navbar.
Please let us know if you have any questions or concerns!
- Watch our screencast constructing this gist
- Modify the code so that:
- …the mouse cursor turns to a hand when you mouseover the buttons, indicating their clickability
- …clicking on a
nav li
scrolls down to another part of the page with a same-page anchor link - …the width of the
li
's changes automatically when you add anotherli