theme-color value for the name 属性在 <meta> element indicates a suggested color that user agents should use to customize the display of the page or of the surrounding user interface. If specified, the content attribute must contain a valid CSS <color> .

范例

<meta name="theme-color" content="#4285f4">
			

The following image shows the effect that the <meta> element above will have on a document displayed in Chrome running on an Android mobile device.

Image showing the effect of using theme-color
Image credit: from Icons & Browser Colors , created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License .

规范

规范
HTML 实时标准
The definition of 'theme-color' in that specification.

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
theme-color Chrome 部分支持 73 注意事项
部分支持 73 注意事项
注意事项 Desktop Chrome only uses the color on installed progressive web apps. (Per caniuse.com.)
不支持 39 — 72 注意事项
注意事项 Desktop Chrome 39-72 claimed to have support, but did not actually use the color anywhere. Chrome for Android did use the color in the toolbar. (Per caniuse.com.)
Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 完整支持 80 注意事项
完整支持 80 注意事项
注意事项 Chrome for Android does not use the color on devices with native dark-mode enabled. (Per caniuse.com.)
Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 完整支持 6.2

图例

完整支持

完整支持

部分支持

部分支持

不支持

不支持

见实现注意事项。

见实现注意事项。

元数据

  • 最后修改: