我有一个奇怪的问题,折叠菜单闪烁一次然后在将屏幕尺寸减小到移动后消失。任何帮助将不胜感激
Here's a link to the live site,代码在
之下<nav class='navbar navbar-default navbar-fixed-top main-nav no-margin-bottom' role='navigation'>
<!-- Brand and toggle get grouped for better mobile display -->
<div class='container'>
<div class='navbar-header padding-bottom margin-bottom'>
<button class='navbar-toggle' data-target='#bs-example-navbar-collapse-1' data-toggle='collapse' type='button'>
<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='<?php echo get_option('home'); ?>'>
<div class='logo'></div>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class='collapse navbar-collapse' id='bs-example-navbar-collapse-1'>
<ul class='nav navbar-nav navbar-right'>
<li>
<a class='btn btn-default navbar-btn' href='<?php bloginfo('url'); ?>/request-an-invite/'>Request an invite</a>
</li>
</ul>
<?php wp_nav_menu( array('menu' => 'Main', 'container' => '', 'items_wrap' => '<ul class="nav navbar-nav navbar-right">%3$s</ul>' )); ?>
</div>
</div>
</nav>
答案 0 :(得分:1)
您似乎正在使用自定义CSS对抗Bootstrap,例如:
.navbar-collapse.collapse {
display: none !important;
}
我会删除与导航栏相关的所有自定义CSS,并在必要时将其添加回来,一次添加一行。
我还将两个导航栏合并为一个。包含一个项目的列表不是一个列表。