折叠的导航栏仍在Twitter Bootstrap网站上扩展
问题描述:
我对此网站有疑问
http://www.Ghitulescu.de/beta/index.html
在iPhone或小型浏览器窗口上:导航栏会在较小的屏幕宽度上按预期折叠,然后展开,然后在我选择导航栏菜单项之一的情况下单击导航栏切换BUT时,导航栏仍然像(覆盖iPhone屏幕的一半以上),直到我再次单击导航栏切换.
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.
能给我一个提示吗?
谢谢!
亲切的问候, 弗拉德
答
Bootstrap就是这样设计的.
That's how Bootstrap is designed.
如果您愿意,可以将以下代码添加到您的网站(在Win7 Chrome 32上经过测试):
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');
});