根据用于Web应用程序的Apple开发人员指南(found here),Web应用程序中的状态栏有3个选项;默认为黑色和黑色半透明。
我正在尝试实现default行为,可悲的是,我最后得到的是带有白色文本的黑条。我最初是在Safari中打开应用程序,然后单击“添加到主屏幕”,这是在主屏幕上打开生成的“应用程序”时看到的内容:
供参考,这是我的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有关吗?我期望状态栏具有白色背景和黑色文本。
[经过数小时的努力,我发现应该归咎于iOS 13中的黑暗模式。
进入设置>显示和亮度并切换回光模式即可解决。