如何复制由Web应用程序框架添加的无形嵌入CSS规则?
我的任务是转换A 网站,该网站似乎是通过Web应用程序框架构建的,为常规的HTML/CSS/JS网站。该网站可以访问在这里。
该任务涉及重复现有的CSS规则。但是,我无法将所有嵌入式CSS规则复制为A< style>一次元素,因为它们对我来说是完全看不见的。
以元素.fjrkyu
为例,Chrome DevTools表示该元素的CSS规则嵌入了A< style>元素。请参阅下图。
但是在我单击“< style>”之后为了查看所有其他CSS规则,检查员仅突出显示一个空样式>元素。其他CSS规则没有在哪里可以看到。请参阅下图。
我还尝试复制该>元素,但我得到的只是一个空的< style>其中没有CSS规则。
Firefox DevTools在其样式编辑器中显示了更多信息,并指出了< style>元素包含10个CSS规则。但是,这些CSS规则再也没有看到。
我需要复制所有这些嵌入式CSS规则以重复使用它们。尽管我可以通过一一检查所有元素来一一复制它们,但这很耗时,可能会错过其中的一些。一种复制A< style>的方法元素一次更可取。
I have been tasked with converting a website which appears to be built with a web application framework into a regular HTML/CSS/JS website. The website can be accessed here.
The task involves reusing the existing CSS rules. However, I'm unable to copy all embedded CSS rules in a <style> element at once because they are completely invisible to me.
Take an element .fjRKyu
as an example, Chrome DevTools indicates that the element's CSS rule are embedded in a <style> element. Please see the figure below.
But after I click the "<style>" in order to see all other CSS rules, the inspector only highlights an empty <style> element. Other CSS rules are no where to be seen. Please see the figure below.
I also tried copying the outerHTML of that <style> element, but all I got is just an empty <style> element with no CSS rules in it.
Firefox DevTools shows a bit more information in its Style Editor and indicates that the <style> element contains 10 CSS rules. But again, those CSS rules are no where to be seen.
I need to copy all those embedded CSS rules in order to reuse them. Although I can copy them one by one by inspecting all elements one by one, that's time-consuming and can potentially miss some of them. A way for copying all CSS rules in a <style> element at once is more preferable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些规则是使用 insertrule api。
要将有效内容复制到剪贴板:
&lt; style&gt;
元素您可以将此代码保存为 devtools摘要在Chrome中,并通过
Ctrl-P
快捷方式快速运行它。These rules are generated programmatically using insertRule API.
To copy the effective contents to clipboard:
<style>
element in devtoolsYou can save this code as a devtools snippet in Chrome and run it quickly via
Ctrl-P
shortcut.