iPhone 11上的apple-mobile-web-app-status-bar-style

问题描述 投票:0回答:1

根据用于Web应用程序的Apple开发人员指南(found here),Web应用程序中的状态栏有3个选项;默认为黑色和黑色半透明。

  • 默认结果是带有黑色文本的白色状态栏
  • 黑色导致黑色状态栏带有白色文本
  • 黑色半透明导致带有白色文本的透明背景

我正在尝试实现default行为,可悲的是,我最后得到的是带有白色文本的黑条。我最初是在Safari中打开应用程序,然后单击“添加到主屏幕”,这是在主屏幕上打开生成的“应用程序”时看到的内容:

enter image description here

供参考,这是我的HTML外观:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="mobile-wep-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, viewport-fit=cover">

我的manifest.json包括此内容:

"display" : "fullscreen"

这与iPhone 11有关吗?我期望状态栏具有白色背景和黑色文本。

html web-applications progressive-web-apps statusbar meta
1个回答
0
投票

[经过数小时的努力,我发现应该归咎于iOS 13中的黑暗模式。

进入设置>显示和亮度并切换回模式即可解决。

© www.soinside.com 2019 - 2024. All rights reserved.