我如何在Chrome中获得CSS选择器? [英] How can I get the CSS Selector in Chrome?

查看:1333
本文介绍了我如何在Chrome中获得CSS选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


div.firstRow
div.priceAvail> div> div.PriceCompare> div.BodyS


我知道您可以在底部看到选择做一个检查元素,但是如何将这个路径复制到剪贴板?在Firebug中,我认为你可以做到这一点,但是没有看到使用Chrome开发者工具来做到这一点的方法,并且搜索一个扩展没有启动任何东西。



这是我想要做更多的参考:
http://asciicasts.com / episodes / 173-screen-scraping-with-scrapi

解决方案

虽然不是扩展名,但我找到了名为 Selector Gadget 的小书签完全符合我的要求。


I want to be able to select/highlight an element on the page and find its selector like this:

div.firstRow div.priceAvail>div>div.PriceCompare>div.BodyS

I know you can see the selection on the bottom after doing an inspect element, but how can I copy this path to the clipboard? In Firebug I think you can do this, but don't see a way to do this using the Chrome Developer Tools and search for an extension did not turn-up anything.

This is what I am trying to do for more reference: http://asciicasts.com/episodes/173-screen-scraping-with-scrapi

解决方案

Although not an extension, I did find a bookmarklet called Selector Gadget that does exactly what I was looking for.

这篇关于我如何在Chrome中获得CSS选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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