Civ*_*ian 10 html css iphone safari web-applications
我正在尝试找到一种方法来更改我当前正在开发的移动网络应用程序的 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”?
除了编辑元标记之外还有其他方法来更改状态栏的背景颜色吗?
感谢您的帮助!
efk*_*kah 14
刚刚偶然发现了这一点,我的解决方案是将其放入头部:
<meta name="theme-color" content="#ff8000" />
Run Code Online (Sandbox Code Playgroud)
尝试这个:
在你的index.html>head标签上使用这个:
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
Run Code Online (Sandbox Code Playgroud)
您还需要在 styles.css 中设置: body { background-color: #yourcolor }
上次尝试时它对我有用,但请记住也用此信息填充manifest.webmanifest