ionic-framework - 如何在 ionic 中启用滚动?

标签 ionic-framework

我有一个登录页面。它现在已修复,但我想在我专注于任何一个文本框时启用滚动。怎么做?

 <ion-view>

<ion-content class="background">
    <div class="loginscreen">
        <div class="row">
            <div class="col-80 col-offset-10">

                <div class="appheader-frame">
                    <span>
          <img src="img/clock.png" alt="clock" class="clockwidth"></img>
        </span>
                    <h1 class="timesheettext">
          <b>Timesheet Tracking</b>
        </h1>

                </div>

            </div>

        </div>

        <div class="row">
            <div class=" formpadding col-80  col-offset-10">
                <form novalidate name="loginForm" ng-submit="doLogin(loginForm)">
                    <label class="item item-input labelusername">
                        <i class="icon  placeholder-icon"><img src="img/user.png" alt="" style="width:20px;height:20px;"/></i>
                        <input name="UserName" type="text" ng-model="User.UserName" placeholder="Username or Email" ng-focus="hidefooter()" required>
                    </label>
                    <p ng-show="loginForm.UserName.$error.required && loginSubmitted" class="usernameerror">
                        Please provide username
                    </p>
                    <label class="item item-input labelpassword">
                        <i class="icon  placeholder-icon"><img src="img/password.png" alt="" style="width:20px;height:20px;"/></i>
                        <input type="password" name="password" id="password" ng-model="User.Password" placeholder="Password" ng-focus="hidefooter()" required>
                    </label>
                    <p ng-show="loginForm.password.$error.required && loginSubmitted" class="usernameerror">
                        provide Password
                    </p>
                    <p ng-show="myflag">
                        wrong credentials
                    </p>

                    <button class="button button-block button-lightgreen" type="submit">
                        <p class="login">
                            <b>submit</b>
                        </p>
                    </button>

                </form>
            </div>
        </div>
    </div>
    <div class="bar bar-footer bar-inherit myfooter hide-on-keyboard-open">
        <div class="title">
            <p id="footer" class="byxyz" ng-show=footerflag>By xyz Software Pvt Ltd</p>
        </div>
    </div>
</ion-content>
 </ion-view>

这在 ionic 框架中可能吗?那怎么办呢?请解释一下。并且不要删除页面中的任何内容,也不要添加更多详细信息以使其滚动。我只是想在其中启用滚动,但页面应该与现在相同

最佳答案

只需在 ion-content 中添加 overflow-scroll="false" 即可。

  <ion-content class="background" overflow-scroll="false" >
       //code

  </ion-content>

关于ionic-framework - 如何在 ionic 中启用滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35908615/

相关文章:

javascript - 根据给定的键更改 javascript 对象中元素的顺序

angular - 接口(interface) 'HTMLIonIconElement' 不能同时扩展类型 'IonIc on' 和 'HTMLStencilElement'

ionic-framework - ionic 服务忽略 gulpStartupTasks

angular - 在另一个 promise 中立即更新该值后,将 from 运算符与 promise 一起使用时,Observable 获得错误的值

angular - ionic 水平滚动条

javascript - Angularjs 问题 $http.get 未加载图像

javascript - ionic 输入 onclick in ionic 4 angular 6

Angular SVG 圆形进度条不适用于 Ionic

javascript - 如何更改 ion-item 的文本颜色

javascript - Ionic 3 谷歌地图集成