简体   繁体   English

Firefox开发者工具添加新规则?

[英]Firefox developer tools adding a new rule?

I decided to try out the built in Firefox Developer Tools. 我决定试用内置的Firefox开发者工具。 Seems to be nice, but... 似乎很好,但......

I can't find out how to add a new rule to the CSS from Inspector/Rules. 我无法找到如何从Inspector / Rules向CSS添加新规则。 By that I mean ".my-new-rule" not just the "element" rule that is open by default. 我的意思是“.my-new-rule”而不仅仅是默认打开的“元素”规则。

FINAL EDIT: This is now possible with the latest Firefox update. 最终编辑:现在可以使用最新的Firefox更新。

Update: 更新:

As of FF 33.00 it is now possible to add new CSS rules using the inspector! 从FF 33.00开始,现在可以使用检查器添加新的CSS规则!


It is not possible to use the inspector to create new CSS rules with out a browser add-on (see comment below). 无法使用检查器在没有浏览器加载项的情况下创建新的CSS规则(请参阅下面的注释)。
Just use the style editor. 只需使用样式编辑器。 Type anywhere to make a new rule: 输入任意位置以制定新规则: 在此输入图像描述

在此输入图像描述

As of Firefox 33 (in nightly right now https://nightly.mozilla.org/ ), this works. 从Firefox 33开始(现在每晚都在https://nightly.mozilla.org/ ),这是有效的。

When you have a node selected in the inspector, you can click on any of the selectors in the "Rules" sidebar to edit them. 在检查器中选择节点后,可以单击“规则”侧栏中的任何选择器进行编辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Chrome开发者工具中添加新的CSS规则,而不是通过检查元素? - Add a new CSS rule in Chrome Developer Tools, not via inspecting an element? 并非所有样式表都显示在开发人员工具(Firefox)中 - Not all stylesheet show up in developer tools (Firefox) CSS规则未显示在开发人员工具中 - CSS rule doesn't show up in developer tools 如何知道谁覆盖了Chrome开发者工具中的规则? - How to know who overrides the rule in Chrome Developer Tools? Chrome开发者工具:如何找出覆盖CSS规则的内容? - Chrome Developer Tools: How to find out what is overriding a CSS rule? 链接在Chrome和Firefox中不可点击,直到打开开发人员工具 - Links un-clickable in Chrome & Firefox until developer tools are opened Firefox 开发工具中的 html 标签上的随机短语? - Random phrase over html tags in Firefox Developer tools? 是否可以在 Firefox 开发人员工具中查看所有编辑过的样式? - Is it possible to see all edited styles in Firefox developer tools? Firefox:样式表在开发者工具中出现多次 - Firefox: style sheet appears multiple times in developer tools 在Firefox开发者工具中自动将CSS“longhand”转换为“速记” - Auto convert CSS “longhand” into “shorthand” in Firefox Developer Tools
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM