[英]bootstrap v3 css issue with dropdown in smartphones
The site I'm working on works fine in a desktop and tablet, but the hamburger nav version in my iPhone doesn't open the sub menus. 我正在工作的网站可以在台式机和平板电脑上正常运行,但是iPhone上的汉堡导航版本无法打开子菜单。 It just closes the nav when the item is selected.
选中该项目后,它将仅关闭导航。
I localized the culprit tag. 我定位了罪魁祸首标签。 When I remove the class 'mbr-navbar__menu', the dropdown does work, but it's visible and misaligned.
当我删除类'mbr-navbar__menu'时,下拉列表确实起作用,但是它是可见的并且未对齐。
Here is the css in question: 这是有问题的CSS:
.mbr-navbar__menu-box { display: table; width: 100%; } .mbr-navbar__menu-box--inline-left, .mbr-navbar__menu-box--inline-center, .mbr-navbar__menu-box--inline-right { display: block; text-align: left; } .mbr-navbar__menu-box--inline-center { text-align: center; } .mbr-navbar__menu-box--inline-right { text-align: right; }
Here is the test page I'm working on. 这是我正在处理的测试页。
I hope this is enough information. 我希望这是足够的信息。 Basically, I just want the dropdowns to work, with the styling that the 'mbr-navbar__menu' class provides.
基本上,我只是希望下拉菜单能够正常工作,并具有'mbr-navbar__menu'类提供的样式。
For hamburgers to work, you need to have this part, especially the icon-bar
part: 为了使汉堡包工作,您需要具有此部分,尤其是
icon-bar
部分:
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
Refer to here for more info http://getbootstrap.com/components/#navbar 有关更多信息,请参考此处http://getbootstrap.com/components/#navbar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.