Chrome扩展程序弹出窗口和选项页面的默认样式表在哪里? [英] Where is the default stylesheet for Chrome extension popups and options pages?

查看:486
本文介绍了Chrome扩展程序弹出窗口和选项页面的默认样式表在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chrome浏览器扩展程序的弹出窗口和选项页面有一个额外的用户代理样式表,可添加类似于Chrome自己的 chrome:// settings 和其他页面的样式。这些样式在解释如何声明您的V2选项页时提到:


chrome_style(boolean) - 可选

如果为true,Chrome用户代理样式表将应用于您的选项页面。默认值为false,但我们建议您启用Chrome以获得一致的用户界面。


该样式表是稳定的API吗?



该样式表在哪里?

解决方案

我在Chromium资源。使用 chrome_style:true 添加以下两个样式表到选项页面:


Popups and Options Pages for Chrome extensions have an additional user agent stylesheet that adds styles similar to Chrome's own chrome://settings and other pages. The styles are mentioned in explaining how to declare your V2 options page:

chrome_style (boolean) - optional

If true, a Chrome user agent stylesheet will be applied to your options page. The default value is false, but we recommend you enable it for a consistent UI with Chrome.

Is that stylesheet a stable API?

Where is that stylesheet?

解决方案

I found the answer in Chromium source. The following two stylesheets are added to Options Pages with chrome_style:true:

这篇关于Chrome扩展程序弹出窗口和选项页面的默认样式表在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆