什么是“用户样式表"?在谷歌浏览器的开发人员工具中? [英] What is "User stylesheet" in Google Chrome's developer tools?

查看:286
本文介绍了什么是“用户样式表"?在谷歌浏览器的开发人员工具中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解user agent stylesheet,但是即使我的Chrome个人资料中的User Stylesheets中没有Custom.css,也只能在开发人员工具的样式"部分中的某些特定站点上看到user stylesheet.

I know about user agent stylesheet but I am seeing user stylesheet only on some specific sites in the Styles section of the developer tools, even though there is no Custom.css in my User Stylesheets in my Chrome Profile.

推荐答案

这些用户样式表"是通过Chrome扩展程序添加的,它们是在清单文件中声明,或使用 .

These "User stylesheet"s are added by Chrome extensions, either declared in a manifest file, or using chrome.tabs.insertCSS.

网页上的样式始终优先于用户样式表,除非(扩展名)用户样式表中设置的规则具有更高的

Styles on the web page always take precedence over the user stylesheet, unless the rule set in the (extension's) user stylesheet has a higher specifity.

如果您想知道哪个扩展负责这些样式表,只需逐个禁用扩展,直到样式表消失.禁用扩展后,在检查器中选择其他元素,然后选择原始元素以刷新视图,而不必重新加载页面.

If you want to know which extension is responsible for these stylesheets, just disable the extensions one by one until the stylesheet goes away. After disabling an extension, select a different element in the inspector, then select the original element to refresh the view, you don't have to reload the page.

这篇关于什么是“用户样式表"?在谷歌浏览器的开发人员工具中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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