I have this Bootstrap 3 navbar: http://www.bootply.com/xkcDjvQslb
I want the following modifications:
- Add banner above the fixed navbar
- Hide the banner when I scroll down
I saw the following example: http://www.bootply.com/69848; not great at bootstrap and when I pull the relevant code it breaks my menu.
The banner (above the navbar) would be a table with a logo on the left side and title on the right. I need someone to point me in the right direction?
Remove navbar-fixed class in nav. Then place markup above the nav.
I found the solution here: http://jsfiddle.net/DTcHh/541/ , just needed to clean up my code:
topnavbar {
margin: 0;
}
#topnavbar.affix {
position: fixed;
top: 0;
width: 100%;
}
#banner {
background-color: yellow;
}
来源:https://stackoverflow.com/questions/27209336/placing-banner-above-the-bootstrap-3-navbar