【问题标题】:Is it possible to access google Chrome's theme?是否可以访问谷歌浏览器的主题?
【发布时间】:2014-12-03 07:26:11
【问题描述】:

这一定是在某个地方问过的,但找不到在哪里:(

我正在阅读 finding out which browser 有人在 html 中使用。

我的网站使用“主题”(DevExpress'黑色玻璃),并且想知道当用户登录时是否有办法访问 Chrome 的当前主题。

我知道这有可能成为一个巨大的事业,但如果可能的话,有没有办法获得 chromes 主题的“css”(显然,这仅适用于用户使用铬)?

我目前正在用 mvc 编写一个项目,但是任何 html/css 方法在这里都会有所帮助。

例如:

是否可以访问“草”主题的 css(请注意,这只是一个示例,还有许多其他主题可用)?

【问题讨论】:

  • google-chrome 主题是什么意思,是默认样式表还是?
  • 如果您登录到 chrome,您可以更改您的主题(在设置中)。我正在考虑尝试获取有关当前主题的信息,而不是默认主题。
  • 真的有人经历过我的一大堆旧问题而否决了他们吗?孩子们,真的。
  • 人家真的没办法了!希望下面的答案有所帮助!

标签: html css asp.net-mvc google-chrome-extension google-chrome-theme


【解决方案1】:

据我所知这是不可能的,因为它不像 CSS 那样工作。您必须获取 JSON 文件,因为我认为 CRX 不可能。

下面是 GC 主题的 JSON 文件的样子:

{
  "version": "1.0",
  "name": "test theme",
  "description": "A test theme",
  "theme": {
    "images" : {
      "theme_frame" : "images/theme_frame_camo.png",
      "theme_toolbar" : "images/theme_toolbar_camo.png",
      "theme_ntp_background" : "images/theme_ntp_background_norepeat.png",
      "theme_ntp_attribution" : "images/attribution.png"
    },
    "colors" : {
      "frame" : [71, 105, 91],
      "toolbar" : [207, 221, 192],
      "ntp_text" : [20, 40, 0],
      "ntp_link" : [36, 70, 0],
      "ntp_section" : [207, 221, 192],
      "button_background" : [255, 255, 255]
    },
    "tints" : {
      "buttons" : [0.33, 0.5, 0.47]
    },
    "properties" : {
      "ntp_background_alignment" : "bottom"
    }
  }
}

更多信息: https://code.google.com/p/chromium/wiki/ThemeCreationGuide

顺便说一句:当有 3-4 种颜色,没有样式时,你为什么想要这个?您可以使用颜色选择器获取颜色。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-13
    • 1970-01-01
    • 1970-01-01
    • 2016-10-26
    • 1970-01-01
    • 2018-09-05
    • 2011-08-18
    • 1970-01-01
    相关资源
    最近更新 更多