Chrome - 禁用特定.css文件中的所有样式 [英] Chrome - disable all styles from specific .css file
问题描述
在检查网站时,是否可以禁用特定的.css文件?我可以在FireFox中做到这一点,但在Chrome中找不到选项。
打开DOM Inspector,找到< link>
或< style>
元素,其中链接样式表,并删除元素。这会导致所有关联的样式被移除。 如果您只想临时禁用样式表,请添加一个新属性 disabled
到< link>
/ < style>
元素。 如果网站包含大量令人分心的DOM元素,则还可以访问控制台,并且可以访问 document.styleSheets [0] .disabled = true;
(其中 0
是样式元素的索引)。 $ b
When inspecting a web site, is it possible to disable a particular .css file? I can do it in FireFox but can't find the option in Chrome.
If you want to remove the style for the remainder of the page session, open the DOM Inspector, locate the <link>
or <style>
element which links the style sheet, and remove the element. This causes all associated styles to be removed.
If you only want to disable the style sheet temporarily, add a new attribute disabled
to the <link>
/<style>
element. Remove this attribute to enable the style sheet again.
If the site contains lots of distracting DOM elements, you can also visit the console, and something like document.styleSheets[0].disabled = true;
(where 0
is the index of the style element).
这篇关于Chrome - 禁用特定.css文件中的所有样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!