菜单切换在xs中打破所有内容。

时间:2015-10-31 14:16:41

标签: twitter-bootstrap-3

当我到达xs(手机版)并按下切换菜单按钮时,它会打破整个布局,旋转木马会在所有内容之上。

这是简单的侧边栏           简单的侧边栏 - 启动Bootstrap模板

    <body>

       <div id="wrapper">

        <!-- Sidebar -->
        <div id="sidebar-wrapper">
            <ul class="sidebar-nav">
                <li class="sidebar-brand">
                    <a href="#">RFA</a>
                </li>
                <li>
                    <a href="#">BIO</a>
                </li>
                <li>
                    <a href="#">Contact</a>
                </li>
                <li>
                    <a href="#">Cadre</a>
                </li>
                <li>
                    <a href="#">Store</a>
                </li>
                <li>
                    <a href="#">Conferences</a>
                </li>

            </ul>
        </div>
        <!-- /#sidebar-wrapper -->

        <!-- Page Content -->
      <div id="page-content-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-xs-12 col-lg-12">
                      <h1 class="col-xs-12">Robin Fogarty and Associates</h1>
                      <img src="images/RFA_circles.png" alt="RFA" class="img-responsive rfa" title="Robin Fogarty and Associates">
                      <p>For the past 15 years Robin Fogarty and Associates has been a publisher and leading experts on staff development design for Skylight Publishing .</p>
                      <a href="#menu-toggle" class="btn btn-default" id="menu-toggle">Toggle Menu</a>
                    </div>
                </div>
            </div>
        </div>
        <div id="carousel1" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <li data-target="#carousel1" data-slide-to="0" class="active">                                    </li>
            <li data-target="#carousel1" data-slide-to="1"></li>
            <li data-target="#carousel1" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner" role="listbox">
            <div class="item active"><img src="images/Rote&Spatial_color.png" alt="First slide image" class="center-block">
              <div class="carousel-caption">
                <h3>First slide Heading</h3>
                <p>First slide Caption</p>
              </div>
            </div>
            <div class="item"><img src="images/WalikingwithDaisy_color.png" alt="Second slide image" class="center-block">
              <div class="carousel-caption">
                <h3>Second slide Heading</h3>
                <p>Second slide Caption</p>
              </div>
            </div>
            <div class="item"><img src="images/Poster.png" alt="Third slide image" class="center-block">
              <div class="carousel-caption">
                <h3>Third slide Heading</h3>
                <p>Third slide Caption</p>
              </div>
            </div>
          </div>
          <a class="left carousel-control" href="#carousel1" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span><span class="sr-only">Previous</span></a><a class="right carousel-control" href="#carousel1" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span><span class="sr-only">Next</span></a></div>




        <!-- /#page-content-wrapper -->


    <!-- /#wrapper -->

    <!-- jQuery -->
    <!-- <script src="js/jquery.js"></script> -->
<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.min.js"></script> <!-- Menu Toggle Script -->
    <script>
    $("#menu-toggle").click(function(e) {
        e.preventDefault();
        $("#wrapper").toggleClass("toggled");
    });
    </script>

1 个答案:

答案 0 :(得分:0)

将您的轮播连续包裹,应用此CSS

.carousel-wrap{
   margin-top: 50px;
}

CODEPEN DEMO