离子清新剂和固定元素

时间:2018-05-23 13:21:43

标签: html css ionic-framework

index behind other div

我在索引为

的地方绘制了一个红色的ligne

所以我有一个固定的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>

1 个答案:

答案 0 :(得分:0)

尝试使用Ionic Framework中的ion-toolbar组件(https://ionicframework.com/docs/api/components/toolbar/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>应解决此问题。

相关问题