简体   繁体   English

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

[英]Hide nav-bar in Ionic app

On login screen of my mobile app , i want to hide default nav-bar by ionic. 在我的移动应用程序的登录屏幕上,我想按离子隐藏默认的导航栏。 I want screen to be full size not having any header bar. 我希望屏幕为全尺寸,没有任何标题栏。 I saw a lot of answers on below links: 我在以下链接上看到了很多答案:

Good pattern for hiding ion-nav-bar on login and not having a back button just after login? 登录后隐藏ion-nav-bar且登录后没有后退按钮的好模式?

how to hide header bar in ionic? 如何在离子隐藏标题栏?

But it did not fix the actual issue. 但这并不能解决实际问题。 i am able to hide nav-bar but blank space is taken by nav-bar on top which is not getting removed. 我能够隐藏导航栏,但导航栏顶部的空白不会被删除。

Any Clues? 有线索吗?

You can do it with the help of css, 您可以在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> 

This will hide header footer and tab bar, just paste it outside(below) of ion-view of your login page. 这将隐藏页眉页脚和标签栏,只需将其粘贴到登录页面的ion-view的外部(下方)即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM