我想在用户向上或向下滚动页面时隐藏页脚。当它停止在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',
];
}
}
答案 0 :(得分:-1)
根据定义,页脚会粘在底部。我不认为你可以改变它。我遇到了同样的问题。我解决了这个问题。并为我工作
<强>样品强>
<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>