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

标签 android ios cordova ionic-framework

在我的移动应用程序的登录屏幕上,我想通过 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/

相关文章:

javascript - 在 JavaScript 中删除文件

java - 我可以在 Android 应用程序的 NavigationView 项目中使用 Google 登录吗?

android - PdfDocument.PageInfo.Builder(Rect, int) 构造函数抛出问题

ios - swift -4 : How to fetch data using POST request with Parameters in URLSession with "Content-Type" : "application/x-www-form-urlencoded"

python - BlueSocket 在连接到 Python Socket 套接字时说连接被拒绝

cordova - 是否可以使用 phonegap 保存 blob?

Android:LinearLayout 占据 100% 的 View

android - 进行 rxJava 网络调用并根据响应在 UI 线程上推进工作的最佳方法是什么

ios - VIPER 架构可以在单个模块中包含多个 UIViewController 吗?

javascript - Sqlite:检查数据库是否存在