【问题标题】:Google Chrome Custom.css webkit-scrollbar no longer worksGoogle Chrome Custom.css webkit-scrollbar 不再工作
【发布时间】:2014-03-23 19:39:03
【问题描述】:

Chrome 最近更新到(版本 33.0.1750.117 m),我使用的是自定义滚动条,因为我讨厌那个白色的滚动条。此更新已发布,此代码不再影响此浏览器。

::-webkit-scrollbar {height: 12px!important;width: 12px!important;background: -webkit-linear-gradient(40deg , #000000 , #1e1e1e , #000000 100%)!important;} ::-webkit-scrollbar-thumb {background-color: #840000!important;border-radius: 16px!important;} ::-webkit-scrollbar-corner {background: #0000!important;}

任何人都知道他们做了什么,最重要的是如何让它再次工作。谢谢:)

【问题讨论】:

    标签: google-chrome webkit scrollbar


    【解决方案1】:

    整个用户样式表 (Custom.css) 已损坏。我报告了一个问题(来自“关于”页面)。

    使用像 Stylish 这样的扩展并不是一个更好的选择,因为扩展会占用 RAM,而且由于有很多有用的扩展,你已经拥有了一些(想到谷歌词典、AdBlock 和修复下载架的东西)。用户脚本也是一个糟糕的选择,因为没有全局样式。我使用 Custom.css 来设置图像 URL 和内部 url 的样式,例如 chrome://settings,我不相信我可以用用户脚本来做到这一点。

    我很抱歉我没有解决办法,但我不能发表评论。

    【讨论】:

    • 我使用 userstyles 进行样式设置,昨天我注意到当他们发布更新时它也影响了我的扩展,我需要重新修补它们。我希望他们阅读您的报告,因为 Custom.css 很好用。对我来说,在深色风格的网站上看到滚动条很恶心。
    【解决方案2】:

    以下是在 Google Chrome 中重新获取自定义 CSS 的解决方法:

    1. 创建一个文件夹并调用它,比如CustomCss
    2. 在文件夹中,创建一个名为manifest.json 的文件,内容如下:

      {
          "name": "My Style Sheet",
          "content_scripts": [
              {
                "matches": ["*://*/*"],
                "css": ["Custom.css"]
              }
          ],
          "version": "1.0.0",
          "description": "User StyleSheet replacement",
          "manifest_version": 2
      }
      
    3. 在文件夹中,从 User StyleSheets 文件夹中复制您的 Custom.css 文件。
    4. 转到 chrome://extensions
    5. 确保开发者模式被选中。
    6. 点击[加载解压后的扩展...]
    7. 浏览到在步骤 1 中创建的文件夹,然后单击 [确定]。
    8. 松了一口气。

    来源:Comment #4 on Chromium Issue 340072

    【讨论】:

      【解决方案3】:

      我的 chrome 浏览器版本是 34.0.1847.116 m。 以下样式仍在我的 chrome 中工作:

      ::-webkit-scrollbar {
          width: 5px;
          height: 5px;
          background-color: rgba(255,255,255, 0);
          -webkit-border-radius: 100px;
      }
      ::-webkit-scrollbar:hover {
          width: 7px;
      }
      
      ::-webkit-scrollbar-thumb {
          background: #FAE5F6;
          -webkit-border-radius: 100px;
      }
      
      ::-webkit-scrollbar-thumb:hover,
      ::-webkit-scrollbar-thumb:active  {
          background: #fabae1;
      }
      

      检查一次......如果仍然不起作用,请在升级您的 chrome 后尝试......

      希望对你有帮助:)

      【讨论】:

        猜你喜欢
        • 2015-05-20
        • 2014-02-08
        • 2021-11-04
        • 1970-01-01
        • 2011-04-27
        • 2012-07-26
        • 2016-08-21
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多