首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >引导3.0应用程序不滚动

引导3.0应用程序不滚动
EN

Stack Overflow用户
提问于 2014-06-25 13:05:09
回答 1查看 2.3K关注 0票数 4

我有一个非常基本的引导/ AngularJS应用程序。这个应用程序只显示从服务器返回的数据行。当所有数据都出现时,如果数据超出页面,我就无法向下滚动页面。我搞不懂为什么会这样。我的HTML看起来如下:

代码语言:javascript
复制
<body>
  <header class="header fixed-top clearfix" role="navigation">
    <nav class="navbar navbar-default" role="navigation">
      <div class="container-fluid">    
        <div class="navbar-header">
          <a class="navbar-brand" href="/">
            <img src="assets/images/logo.png" class="logo" alt="My App">
          </a>                
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav"> 
            <li><a href="/#/overview">Overview</a></li>                        
            <li><a href="/#/report-1">Report 1</a></li>
            <li><a href="/#/report-2">Report 2</a></li>
          </ul>
        </div>
      </div>
    </nav>
  </header>

  <div class="col-lg-12">
    <div>
      <div>
        <div class="tabbable tabs-below">
      <ul class="nav nav-pills">
            <li ng-class="{active: selectedTab == 1}" class="">
              <a ng-click="selectedTab = 1;">By Month</a>
        </li>
            <li ng-class="{active: selectedTab == 2}">
              <a ng-click="selectedTab = 2;">By Week</a>
        </li>
            <li ng-class="{active: selectedTab == 3}" class="active">
              <a ng-click="selectedTab = 3;" class="">By Day</a>
            </li>
      </ul>

      <div class="tab-content ng-hide" ng-show="selectedTab == 1">
        <h3>Report</h3>
        <table class="table table-striped">
          <thead>
            <tr>
              <th>COL 1</th>
          <th>COL 2</th>                            
          <th>COL 3</th>
          <th>COL 4</th>
          <th>COL 5</th>
          <th>COL 6</th>
        </tr>
              </thead>

          <tbody>
        <tr ng-repeat="record in records" class="ng-scope">
          <td>{{record[0]}}</td>
          <td>{{record[1]}}</td>
          <td>{{record[2]}}</td>
          <td>{{record[3]}}</td>
          <td>{{record[4]}}</td>
          <td>{{record[5]}}</td>
        </tr>
              </tbody>
        </table>                
        <br>
      </div>

          <div class="tab-content ng-hide" ng-show="selectedTab == 2">
        <h3>Report</h3>
          <table class="table table-striped">
        <thead>
          <tr>
            <th>COL 1</th>
            <th>COL 2</th>                          
            <th>COL 3</th>
            <th>COL 4</th>
            <th>COL 5</th>
            <th>COL 6</th>
          </tr>
        </thead>

                <tbody>
          <tr ng-repeat="record in records" class="ng-scope">
            <td>{{record[0]}}</td>
            <td>{{record[1]}}</td>
            <td>{{record[2]}}</td>
            <td>{{record[3]}}</td>
            <td>{{record[4]}}</td>
            <td>{{record[5]}}</td>
          </tr>
        </tbody>
              </table>              
          <br>                  
        </div>

            <div class="tab-content" ng-show="selectedTab == 3">
          <h3>Report</h3>
        <table class="table table-striped">
          <thead>
            <tr>
              <th>COL 1</th>
              <th>COL 2</th>                            
              <th>COL 3</th>
              <th>COL 4</th>
              <th>COL 5</th>
              <th>COL 6</th>
            </tr>
          </thead>

          <tbody>
            <tr ng-repeat="record in records" class="ng-scope">
              <td>{{record[0]}}</td>
              <td>{{record[1]}}</td>
              <td>{{record[2]}}</td>
              <td>{{record[3]}}</td>
              <td>{{record[4]}}</td>
              <td>{{record[5]}}</td>
            </tr>
          </tbody>
        </table>                
        <br>
          </div>
        </div>
      </div>
    </div>
      </div>
</body>

为什么这一页不能滚动?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-06-25 15:20:27

问题是在顶部有一个固定的导航,但是没有容器和行。

containerrow类是网格的要求。布局如下所示

代码语言:javascript
复制
<html>
 <body>
  <div class="container">
   <div class="row">
     <div class="col-md-xx"></div>
       ...
   </div>
   <div class="row">
     <div class="col-md-xx"></div>
       ...
   </div>
  </div>
 </body>
</html>

还可以删除<div class="col-lg-12">中不必要的div。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24409510

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档