在我的移动应用程序的登录屏幕上,我想通过 ionic 隐藏默认导航栏。我希望屏幕是全尺寸的,没有任何标题栏。我在下面的链接上看到了很多答案:
Good pattern for hiding ion-nav-bar on login and not having a back button just after login?
how to hide header bar in ionic?
但它并没有解决实际问题。我能够隐藏导航栏,但顶部的导航栏占用了空白空间,但没有被删除。
有什么线索吗?
最佳答案
你可以在css的帮助下做到这一点,
<style>
.tab-nav, .bar-footer{
display: none !important;
}
.bar.bar-header {
display: none
}
.has-tabs-top {
top: 0px !important;
}
.has-tabs-bottom {
bottom: 0px !important;
}
.has-tabs, .bar-footer.has-tabs, .has-footer.has-tabs {
bottom: 0px;
}
/* custom header footer overrides */
.custom-header, .custom-footer{
display: block !important;
}
</style>
这将隐藏页眉页脚和标签栏,只需将其粘贴到登录页面的 ion-view
之外(下方)即可。
关于android - 在 Ionic 应用程序中隐藏导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37843298/