如何轻松地从网站复制整个 CSS 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20438102/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 01:13:18  来源:igfitidea点击:

How can I easily copy the whole CSS file from a website?

cssdeveloper-tools

提问by user252297

How can I easily copy the whole CSS file a website uses to stylize HTML with Google Chrome, Firefox, Safari, and Opera?

如何使用 Google Chrome、Firefox、Safari 和 Opera 轻松复制网站用于样式化 HTML 的整个 CSS 文件?

With the web inspector, I can see the css styles applied to an element, but I can't see the big picture of styles applied to the whole HTML document.

使用 web 检查器,我可以看到应用于元素的 css 样式,但我看不到应用于整个 HTML 文档的样式的大图。

Can you show me how can I do this?

你能告诉我我该怎么做吗?

回答by Hashbrown

For chrome you can use Quick Source Viewerto see all CSS, whether in the bodyor the head, whether in the served HTML or injected at runtime.

对于 chrome,您可以使用Quick Source Viewer查看所有 CSS,无论是在body或 中head,无论是在提供的 HTML 中还是在运行时注入。

It is better than the dev tools as you don't have to go looking for the styletags, and saving them is just a right click on the link.

它比开发工具更好,因为您不必去寻找style标签,只需右键单击链接即可保存它们。

回答by Asraful Haque

The answer given by Bobby Russell is not correct in this case. Just follow the steps: Open the Firefox and type google.com in the url Now Inspect the googlepage with the help of firebug. You can see in the attached image how to select the css file enter image description here

在这种情况下,Bobby Russell 给出的答案是不正确的。只需按照以下步骤操作: 打开 Firefox 并在 url 中输入 google.com 现在在 firebug 的帮助下检查 googlepage。您可以在附图中看到如何选择 css 文件 在此处输入图片说明

enter image description here

在此处输入图片说明

回答by Bobby Russell

  1. Right click the page and view the source.
  2. Ctrl+F link rel="stylesheet" type="text/css" href="
  3. Follow the link
  4. See the CSS
  1. 右键单击页面并查看源。
  2. Ctrl+F 链接 rel="stylesheet" type="text/css" href="
  3. 按照链接
  4. 请参阅 CSS

Not too hard...right?

不太难……对吧?