页面底部的滚动条

时间:2016-02-28 15:04:01

标签: html twitter-bootstrap

我不确定为什么我会在页面底部获得滚动条enter image description here

正如你在上面的剪切图片中看到的,有滚动条,这意味着有一些潜水的额外宽度,但我删除了所有的CSS,但仍然给我相同的结果。谁能告诉我为什么会显示这个滚动条?

Working fiddle

3 个答案:

答案 0 :(得分:1)

.row {
    width: 100%;
}

演示:https://fiddle.jshell.net/qgkzdszm/3/

答案 1 :(得分:1)

这只是您当前的结构:您的rows和/或columns通常应遵循此模式。

容器(或容器 - 流体)/行/列 由于您有一些不在容器内的行,因此.row{margin-right:-15px;margin-left:-15px}会显示溢出。

请参阅工作示例摘录。

@media (max-width: 767px) {
  .navbar-nav > li.login {
    display: inline-block;
  }
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div id="wrap">
  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#head_menu" 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="#">CMMS</a>
      </div>
      <div class="collapse navbar-collapse" id="head_menu">
        <ul class="nav navbar-nav">
          <li><a href="#" data-toggle="collapse" data-target=".navbar-collapse.in"><span class="glyphicon glyphicon-home"></span> Home</a>
          </li>
          <li> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in"> About CMMS</a>
          </li>
          <li> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in"> Services</a>
          </li>
          <li> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in"> JPS</a>
          </li>
          <li> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in"> Contact</a>
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li class="login">
            <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in">
              <span class="glyphicon glyphicon-log-in">
          </span> Login
            </a>
          </li>
          <li class="login">
            <img id="jps" src="http://placehold.it/50x50">
          </li>
        </ul>
      </div>
    </div>
  </nav>
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-12">
        <div class="div_head">
          <h3>CMMS</h3>
          <p>
            Something
          </p>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-md-12">
        <div class="div_head">
          <h3>What Is The Purpose Of CMMS?</h3>
          <p>
            Something
          </p>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-md-12">
        <div class="center_img">
          <h3>Reduce downtime</h3>
        </div>
      </div>
    </div>

    <div class="row">
      <!-- thumbnail div container -->
      <div class="thumbnail_container equal">
        <div class="col-sm-3">
          <div class="thumbnail">
            <span class="glyphicon  white"><i class="fa fa-laptop"></i></span>
            <div class="caption">
              <h4>Scada Monitoring</h4>
              <p>
                Something
              </p>
            </div>
          </div>
        </div>
        <div class="col-sm-3">
          <div class="thumbnail">
            <span class="glyphicon  white"><i class="fa fa-users"></i></span>
            <div class="caption">
              <h4>Users Management</h4>
              <p>
                Something
              </p>
            </div>
          </div>
        </div>
        <div class="col-sm-3">
          <div class="thumbnail">
            <span class="glyphicon white"><i class="fa fa-money"></i></span>
            <div class="caption">
              <h4>Expenses</h4>
              <p>
                Something
              </p>
            </div>
          </div>
        </div>
        <div class="col-sm-3">
          <div class="thumbnail">
            <span class="glyphicon white"><i class="fa fa-file-text-o"></i></span>
            <div class="caption">
              <h4>System Log</h4>
              <p>
                Something
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div id="push"></div>

  </div>
</div>
<!-- end wrap-->
<!-- footer div -->
<div class="container">
  <div id="footer">
    <div class="row footer">
      <div class="col-sm-4 address">
        <p>
        </p>
      </div>
    </div>
  </div>

答案 2 :(得分:0)

因为它不适合。你可以使用外部div,如下所示:

func2

查看实时演示here