Ionic 3 Button 没有完全固定在页脚处,它会在滚动时移动
Ionic 3 Button is not totally fixed at the footer and it moves while scrolling
我需要修复 ionic 3 项目页面底部的按钮。
实际的 scss 脚本有效,但按钮没有完全固定在底部,它会在滚动时移动。
这是 sass 脚本:
.fixedBtn{
width: 100%;
position: fixed;
left: 0;
bottom: 10px;
right: 0;
}
我尝试使用 flex
:
div{
display: flex;
flex-direction: column;
}
但结果如stackblitz所示,这不是正确的行为。
放这个:
<button ion-button primary class="fixedBtn">a</button>
ion-content 外侧
应该像
<ion-content>
/** your content */
</ion-content>
<button ion-button primary class="fixedBtn">a</button>
并在您的 sass 文件中:
.fixedBtn{
width: 100%;
position: fixed !important;
left: 0;
bottom: 50px;
right: 0;
}
我需要修复 ionic 3 项目页面底部的按钮。
实际的 scss 脚本有效,但按钮没有完全固定在底部,它会在滚动时移动。
这是 sass 脚本:
.fixedBtn{
width: 100%;
position: fixed;
left: 0;
bottom: 10px;
right: 0;
}
我尝试使用 flex
:
div{
display: flex;
flex-direction: column;
}
但结果如stackblitz所示,这不是正确的行为。
放这个:
<button ion-button primary class="fixedBtn">a</button>
ion-content 外侧 应该像
<ion-content>
/** your content */
</ion-content>
<button ion-button primary class="fixedBtn">a</button>
并在您的 sass 文件中:
.fixedBtn{
width: 100%;
position: fixed !important;
left: 0;
bottom: 50px;
right: 0;
}