给 Chrome for Android 设置顶栏颜色以及图标

Starting in version 39 of Chrome for Android on Lollipop, you’ll now beable to use the theme-color meta tag to set the toolbar color—this means no more Seattle gray toolbars! The syntax is pretty simple: add ametatag to your page’s<head>with thename="theme-color", and set thecontentto any valid CSS color.

Screenshot of phone showing theme-color

For example, to set the background to your favorite color or HTML5Rocks orange:

<meta name="theme-color" content="#db5945">

In addition, Chrome will show beautiful high-res favicons when they’re provided. Chrome for Android picks the highest res icon that you provide, and we recommend providing a 192×192px PNG file. For example:

<link rel="icon" sizes="192x192" href="nice-highres.png">

Check out the theme-color here on HTML5Rocks as well as on the Web Fundamentals site, and be sure to check out the Add to home screen docs for more ways to make your site stand out.

Authors: Pete LePage

Apache 2.0 License