goes behind in Ionic

问题描述 投票:0回答:1
<ion-header> 
  <ion-navbar>
   <ion-title>Physics</ion-title> 
 </ion-navbar> 
</ion-header>

<ion-content padding has-header contentTop="200px"> 
  <ion-list class="chapter-list"> 
      <button ion-item no-padding *ngFor="let chapterList of chapterLists" (click)="chapterListItemClk(event)" no-border> {{ chapterList.video_name }} <img src="{{chapterList.video_icon}}" item-left alt=""> </button> 
  </ion-list> 
</ion-content>

这是我的代码,其中<ion-content>隐藏在<ion-header>背后。我的离子版本是3.19.1。

enter image description here

enter image description here

如何解决这个问题。我也尝试过has-header。

ionic-framework ionic2 ionic3
1个回答
0
投票

尝试在ion-content标签内添加<ion-grid></ion-grid>

<ion-header> 
  <ion-navbar>
   <ion-title>Physics</ion-title> 
 </ion-navbar> 
</ion-header>

<ion-content padding has-header contentTop="200px">
  <ion-grid>
  <ion-list class="chapter-list"> 
      <button ion-item no-padding *ngFor="let chapterList of chapterLists" (click)="chapterListItemClk(event)" no-border> {{ chapterList.video_name }} <img src="{{chapterList.video_icon}}" item-left alt=""> </button> 
  </ion-list> 
  </ion-grid>
</ion-content>
© www.soinside.com 2019 - 2024. All rights reserved.