首页 文章

在Ionic应用程序中隐藏导航栏

提问于
浏览
0

在我的移动应用程序的登录屏幕上,我想通过离子隐藏默认导航栏 . 我想屏幕是全尺寸没有任何 Headers 栏 . 我在下面的链接中看到了很多答案:

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?

但它没有解决实际问题 . 我可以隐藏导航栏但是导航栏顶部没有删除空白区域 .

任何线索?

1 回答

  • 1

    你可以在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 的外部(下方) .

相关问题