如何在 Lollipop 的最新 Chrome 版本中更改标题栏和地址栏的颜色? [英] How to change the color of header bar and address bar in newest Chrome version on Lollipop?
问题描述
尚未找到有关此主题的任何内容.我真的很喜欢在概览上更改地址栏颜色和标题颜色的功能吗?有什么简单的方法可以做到这一点吗?
Haven't found anything on this topic yet. I really like the ability to change the color of address bar and header color on Overview? Is there any easy way to do this?
.
我认为您需要 Android 5.0 Lollipop 才能使用此功能,并且 Chrome 的合并标签和应用设置为开启.
I think you need Android 5.0 Lollipop for this to work, and Chrome's Merge Tabs and Apps set to On.
推荐答案
经过一番搜索找到了解决方案.
Found the solution after some searching.
您需要在包含 name="theme-color"
的 中添加
标记,使用您的十六进制代码作为内容值.例如:
You need to add a <meta>
tag in your <head>
containing name="theme-color"
, with your HEX code as the content value. For example:
<meta name="theme-color" content="#999999" />
更新:
如果安卓设备启用了原生dark-mode
,那么这个meta
标签将被忽略.
Update:
If the android device has native dark-mode
enabled, then this meta
tag is ignored.
Android 版 Chrome 不会在启用了原生 dark-mode
的设备上使用该颜色.
Chrome for Android does not use the color on devices with native
dark-mode
enabled.
来源: https://caniuse.com/#search=theme-颜色
这篇关于如何在 Lollipop 的最新 Chrome 版本中更改标题栏和地址栏的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!