滚动不在离子视图中工作

时间:2017-03-11 14:43:31

标签: html css angularjs ionic-framework

我是离子框架的新手。我试图让我的离子页面设计正确,但我面临滚动相关的问题。以下是我的index.html代码: -

merge

它显示了UI,以下是问题: - 1)还有一些差距,如下图所示: - enter image description here

2)有一些内容隐藏在页脚下,如下图所示: - enter image description here

我不知道,我在使用离子含量和离子视图方面犯了什么错误。 提前谢谢。

1 个答案:

答案 0 :(得分:3)

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title></title>

    <link rel="manifest" href="manifest.json">

    <!-- un-comment this code to enable service worker
    <script>
      if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('service-worker.js')
          .then(() => console.log('service worker installed'))
          .catch(err => console.log('Error', err));
      }
    </script>-->

    <link href="lib/ionic/css/ionic.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/ionic.app.css" rel="stylesheet">
    -->

    <!-- ionic/angularjs js -->
    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>

    <!-- your app's js -->
    <script src="js/app.js"></script>
  </head>
  <body ng-app="starter">

    <ion-side-menus>
        <ion-side-menu-content>
            <ion-nav-bar class="bar-positive">
                <ion-nav-buttons side="left">
                    <button class="button button-icon ion-navicon" menu-toggle="left"></button>
                </ion-nav-buttons>
                <ion-nav-buttons side="right">
                    <button class="button button-icon ion-search"></button>
                    <button class="button button-icon ion-ios-email"></button>
                    <button class="button button-icon ion-ios-person"></button>
                </ion-nav-buttons>
                <h1 class="title"> Main Nav bar</h1>
            </ion-nav-bar>
            <ion-header-bar class="bar bar-balanced bar-subheader">
                <button class="button button-icon icon ion-chevron-left"></button>
                <button class="button">ABC</button>
                <h2 class="title">Sub Header</h2>
            </ion-header-bar>
                    <ion-content>
                        <h1> Sub header example 1</h1>
                        <h1> Sub header example 2</h1>
                        <h1> Sub header example 3</h1>
                        <h1> Sub header example 4</h1>
                        <h1> Sub header example 5</h1>
                        <h1> Sub header example 6</h1>
                        <h1> Sub header example 7</h1>
                        <h1> Sub header example 8</h1>
                        <h1> Sub header example 9</h1>
                        <h1> Sub header example 10</h1>
                        <h1> Sub header example 11</h1>
                        <h1> Sub header example 12</h1>
                        <h1> Sub header example 13</h1>
                        <h1> Sub header example 14</h1>
                        <h1> Sub header example 15</h1>
                    </ion-content>
<ion-footer-bar class="bar bar-footer bar-positive">
                Footer
            </ion-footer-bar>
        </ion-side-menu-content>
        <ion-side-menu side="left">
            <ul class="list">
                <li class="item">first
            </ul>
        </ion-side-menu>
    </ion-side-menus>
  </body>
</html>

你可以尝试这个微小的改变,这将适用于你