问题
I have a problem with this website
http://www.Ghitulescu.de/beta/index.html
on an iPhone or at small browser windows: the navbar collapse as expected at smaller screen-widths, expands then when clicked on the navbar-toggle BUT when I am choosing one of the navbar-menu-items, the navbar remains like this (and covers more than the half of the iPhone-screen) until I click on the navbar-toggle again.
Could you please give me a hint?
Thank you!
Kind regards, Vlad
回答1:
That's how Bootstrap is designed.
If you would like it do that, add the following code to your site (Tested on Win7 Chrome 32):
$('ul.navbar-nav').on('click', function() {
$('.navbar-collapse').collapse('hide');
});
来源:https://stackoverflow.com/questions/21653967/collapsed-navbar-remains-expanded-on-a-twitter-bootstrap-website