Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Google Chrome 扩展中,我使用 DOM api 来获取样式表及其元素。当我看到它们时,Chrome 已经对它们进行了解析 - 有没有办法在 Chrome 通过扩展程序获取它之前查看预解析的 CSS?
我假设您想阅读原始*.css文件。如果这是您想要的,您可以简单地通过 Ajax 将文件作为文本文件获取,并将其内容作为字符串读取。(如果文件位于网站上,未打包在扩展程序中,请确保您拥有该域或所有域的主机权限,具体取决于您的需要。)
*.css