简体   繁体   English

在Firefox(或其他)检查器中可以选择HTML元素吗?

[英]Multiple selection of HTML elements in Firefox (or other) inspector?

In the question https://stackoverflow.com/questions/33907611/controlling-line-spacing-with-br-firefox-rendering-differences-with-html4-doc , I wanted to show the boxes of HTML elements, as that would have clarified the problem best. 在问题https://stackoverflow.com/questions/33907611/controlling-line-spacing-with-br-firefox-rendering-differences-with-html4-doc中 ,我想显示HTML元素的框,因为那样最好地解决了这个问题。 Unfortunately, I couldn't find a way to select multiple elements when using the Firefox inspector, so I had to select each element individually, take a screenshot, and then combine the screenshots into an animated gif like this: 不幸的是,在使用Firefox检查器时,我找不到选择多个元素的方法,因此我不得不单独选择每个元素,截取屏幕截图,然后将屏幕截图组合成动画gif,如下所示:

FF-doc4.gif

... which is a rather tedious and time-consuming job. ...这是一个非常繁琐且耗时的工作。

Is there a way to do a multiple selection - either from the main browser window, or from the HTML tree in the inspector in the bottom - such that the element boxes of the selected elements are all indicated/shown simultaneously? 是否可以从主浏览器窗口或底部检查器中的HTML树中进行多项选择,以便同时显示/显示所选元素的元素框? I tried Ctrl+click-ing, that doesn't work... 我尝试了Ctrl + click-ing,这不起作用...

Alternatively, is there another addon/browser/tool that can do this (maybe Chrome?) 另外,是否有另一个插件/浏览器/工具可以做到这一点(可能是Chrome?)

In going through the latest release of Google Developers' EDIT THE DOM section for Chrome, there is no mention of the ability to select multiple elements. 在浏览最新版的Google Developers的Chrome的DOM编辑部分中,没有提到选择多个元素的功能。 This suggests the feature doesn't exist. 这表明该功能不存在。

A similar question came to the same conclusion, albeit the link reference wasn't much help. 尽管链接引用并没有太大帮助,但类似的问题得出了相同的结论。

Thinking about it logically, however, there's really no way such a feature could reasonably work: Once an element is highlighted, dev tools (or Inspector) populates the right panel with the element's styles, computed values, event listeners, and other unique data. 但是,从逻辑上进行思考,实际上没有任何功能可以合理地起作用:突出显示一个元素后,开发工具(或Inspector)将使用元素的样式,计算值,事件侦听器和其他唯一数据填充右侧面板。 How could dev tools do this for two or more elements at a time? 开发人员工具如何一次对两个或多个元素执行此操作? Maybe it's technically possible, but the appearance would be messy, cluttered and potentially confusing. 也许在技术上是可行的,但外观会混乱,混乱且可能造成混淆。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM