【问题标题】:How to scroll div with another div?如何用另一个 div 滚动 div?
【发布时间】:2020-09-08 01:01:35
【问题描述】:

我有一个 Ionic 项目,其中有一个 ion-content 中的项目列表:

<ion-content padding #myContent>
       <!-- lots of data -->
</ion-content>

Ion-footer 有一个点击后执行任务的下一步按钮。

<ion-footer>
  <div *ngIf="nextButtonHolder">
    <div *ngIf="nextButton" class="next" (click)="next()">
</div>
</div>
</ion-footer>

下一个类是与内容重叠的固定 div

.next{
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 10; //overlapping content
    height: 50%;
    width: 100%;
}

如何绑定“下一个”重叠 div(除了可以使用函数 next() 进行点击之外)以滚动离子内容,而不将 next() 分配给离子内容本身?

【问题讨论】:

    标签: javascript css angular typescript ionic-framework


    【解决方案1】:

    Element.prototype.scoll(x: number, y: number)。不能帮忙吗?

    【讨论】:

    • 您能否通过提供上述解决方案的示例来澄清一下?
    猜你喜欢
    • 1970-01-01
    • 2016-11-05
    • 1970-01-01
    • 2021-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-01
    • 1970-01-01
    相关资源
    最近更新 更多