【问题标题】:How to recalculate the height of the ion-row如何重新计算离子排的高度
【发布时间】:2018-02-04 02:36:15
【问题描述】:

我正在开发一个App,其中某个时间会生成一个列表,见:

CSS layer 类填充了 ion-footer 旁边的部分,但是当列表增长过多时,该类无法正常工作,请参阅:

我该如何解决这个问题?它遵循 CSS 类,但我认为问题不在于它,而在于 Ionic 本身。

离子内容

<ion-content class="background">
    <ion-grid class="layer">
        <ion-row>
            <ion-col col-12>
                <div class="title">
                    <p>
                        <strong>Listas de exercícios ({{amountList}})</strong>
                    </p>
                </div>
            </ion-col>
            <ion-col>
                <ion-list>
                    <button ion-item *ngFor="let exercise of exercises" (click)="itemSelected(exercise.id)">
                    {{ exercise.name }}
                  </button>
                </ion-list>
            </ion-col>
        </ion-row>
    </ion-grid>
</ion-content>

CSS

.background {
    background: url(../assets/imgs/bg.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

.layer {
    background-color: rgba(104, 101, 101, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

【问题讨论】:

    标签: css ionic-framework ionic2 ionic3


    【解决方案1】:

    也许你想为你的 ion-list 使用一个 ion-scroll

    【讨论】:

      猜你喜欢
      • 2018-04-02
      • 1970-01-01
      • 1970-01-01
      • 2013-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多