我想在用户向上或向下滚动页面时隐藏页脚。当它停止在Ionic2中滚动时,它再次出现。我在任何地方都找不到正确的答案。我的代码如下
<ion-content>
<ion-list>
<ion-item *ngFor=" let grocery of groceries">
{{grocery}}
</ion-item>
</ion-list>
</ion-content>
<ion-footer>What is the time?</ion-footer>
export class HomePage {
groceries:any;
products:any;
demos:any;
content:any
constructor(public navCtrl: NavController) {
this.groceries = [
'Bread',
'Milk',
'Cheese',
'Snacks',
'Apples',
'Bananas',
'Peanut Butter',
'Chocolate',
'Avocada',
'Vegemite',
'Muffins',
'Paper towels',
];
}
}
按照定义的页脚粘在底部。我认为您无法更改它。我遇到了同样的问题。我解决了这样的问题。
示例
<ion-content>
<ion-list>
<ion-item *ngFor=" let grocery of groceries">
{{grocery}}
</ion-item>
</ion-list>
<ion-row>
<ion-col>
What is the time?
</ion-col>
</ion-row>
</ion-content>