Chrome等同于Firefox的Firebug CSS选择路径 [英] Chrome equivalent of Firefox Firebug CSS select path

查看:315
本文介绍了Chrome等同于Firefox的Firebug CSS选择路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经移动到Chrome,但Firebug lite最烦人的功能之一是它不允许您复制对象的CSS路径。

I've made the move to Chrome, but one of the most annoying features with 'Firebug lite' is that it doesn't allow you to copy the CSS path of objects.

要查看我的意思,在Firefox中,转到google.com并使用Firebug检查徽标。右键单击'hplogo'div并选择'Copy CSS path'。你会得到像:

To see what I mean, in Firefox, go to google.com and inspect the logo with Firebug. Right click on the 'hplogo' div and pick 'Copy CSS path'. You'll get something like:

html body#gsr div#main span#body.ctr-p center div#lga div div#hplogo

这是一个非常有用的功能,我在Chrome上找不到,只能复制Xpath。

This is an incredibly useful feature that I can't find on Chrome, it appears you can only copy the Xpath.

有没有办法在Chrome中使用这种类型的功能?

Is there a way to use this type of functionality in Chrome?

谢谢

推荐答案

在Chrome中没有本地方式获取此信息。你可以做一堆黑客,使用jQuery和书签,如下所示: http://www.edmondscommerce.co.uk/chrome/tip-copy-css-selector-in-chrome/ 以及此处: http://www.selectorgadget.com/

There is no native way to get this information in Chrome. You can do a bunch of hacks, using jQuery and bookmarks as show here: http://www.edmondscommerce.co.uk/chrome/tip-copy-css-selector-in-chrome/ as well as here: http://www.selectorgadget.com/

但是,您可能会发现此扩展程序更加接近到您想要的内容,并且更容易使用: https://chrome.google.com/webstore / detail / lbghbpofdlcecfbpjgmffnkieenjkboi
它将拉动XPath以及CSS路径,并允许您轻松复制文本。

However, you may find this extension to be closer to what you want, and a little easier to use: https://chrome.google.com/webstore/detail/lbghbpofdlcecfbpjgmffnkieenjkboi It will pull the XPath as well as the CSS Path, and allow you to easily copy the text.

这篇关于Chrome等同于Firefox的Firebug CSS选择路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆