4

我正在尝试找到一种方法来更改我目前正在开发的移动网络应用程序的 iOS 状态栏的背景颜色。我已经看到了几种原生应用程序的解决方案,但如果可能的话,我需要一个适用于 Safari 和 Chrome 的解决方案。

我能够找到的文档显示以下选项可用:

<meta name="apple-mobile-web-app-status-bar-style" content="default">

<meta name="apple-mobile-web-app-status-bar-style" content="black">

<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

有没有办法编辑元标记,使背景颜色为“#ff8000”?

除了编辑元标记来更改状态栏的背景颜色之外,还有其他方法吗?

谢谢你的帮助!

4

1 回答 1

3

Try This:

On your index.html>head tag use this:

<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

You also need to set the: body { background-color: #yourcolor } in the styles.css

It worked for me last time I tried, but remember to fill up the manifest.webmanifest with this information as well

于 2019-05-31T14:49:39.353 回答