如何轻松地从网站复制整个 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
How can I easily copy the whole CSS file from a website?
提问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 body
or 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 style
tags, 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
在这种情况下,Bobby Russell 给出的答案是不正确的。只需按照以下步骤操作: 打开 Firefox 并在 url 中输入 google.com 现在在 firebug 的帮助下检查 googlepage。您可以在附图中看到如何选择 css 文件
回答by Bobby Russell
- Right click the page and view the source.
- Ctrl+F link rel="stylesheet" type="text/css" href="
- Follow the link
- See the CSS
- 右键单击页面并查看源。
- Ctrl+F 链接 rel="stylesheet" type="text/css" href="
- 按照链接
- 请参阅 CSS
Not too hard...right?
不太难……对吧?