我在索引所在的位置画了一个红色的木条。
所以我有一个固定的div,但是用我的离子刷新器,当我拉刷新的时候,固定的div似乎是绝对的,我不知道如何解决这个问题。
下面是我的代码
.alphabetItem {
color: #ffffff;
font-size: 10px;
position: fixed;
z-index: 99999999;
right: -4%;
top : 200px;
}
<ion-refresher (ionRefresh)="doRefresh($event)">
<ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Tirer pour rafraîchir" refreshingSpinner="circles" refreshingText="Relâcher pour rafraîchir ...">
</ion-refresher-content>
</ion-refresher>
<ion-col col-1 class="alphabetItem" scrollY="true" style="width:100%; height:100%">
<div class="divLetter" *ngFor="let letter of alphabets" (click)="alphaScrollGoToList(letter)">
{{letter}}
</div>
</ion-col>
发布于 2018-05-23 14:36:18
尝试使用离子框架(https://ionicframework.com/docs/api/components/toolbar/Toolbar/)中的ion-toolbar
组件。
<ion-header>
<ion-toolbar>
<!-- your fixed col -->
</ion-toolbar>
</ion-header>
<ion-content>
...
<!-- your content + refresher -->
...
</ion-content>
ion-refresher
是一个非常特殊的组件。无论你把它放在哪里,它都会被放在最近的ion-content
的顶部。当您刷新时,它将向下移动您的滚动内容,即您固定的容器所在的位置。<ion-toolbar>
应该可以解决这个问题。
https://stackoverflow.com/questions/50489562
复制