Bootstrap-屏幕尺寸缩小后,我的bootstrap菜单不会切换到折叠菜单?

ma8fv8wu  于 2022-12-07  发布在  Bootstrap
关注(0)|答案(1)|浏览(201)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />

<body id="<?php echo ($itemid ? 'itemid-' . $itemid : ''); ?>">
  <div id="wrapper" class="container-fluid">
    <!-- Begin Navbar-->
    <?php if ($this->countModules('position-9')): ?>
    <div class="navbar">
      <div class="navbar-inner">
        <div class="container-fluid">
          <div class="row">
            <div class="col-sm-2" <div>
              <img src="http://i57.tinypic.com/206d2l4.png" style="width:104px;height:110px;">
            </div>
            <div class="col-sm-10">
              <div class="nav-collapse collapse">
                <jdoc:include type="modules" name="position-9" style="none" />
              </div>
            </div>
          </div>
        </div>
        <!--End navbar-->
      </div>

一旦屏幕尺寸缩小,菜单就不会被折叠。菜单项只是互相隐藏,而不是折叠菜单。

mklgxw1f

mklgxw1f1#

你的html是坏的

<div class="row">
    <div class="col-sm-2" 
        <div>

您需要先关闭div

相关问题