Chrome equivalent of Firefox Firebug CSS select path

血红的双手。 提交于 2019-11-30 02:21:14

问题


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.

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

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

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

Thanks


回答1:


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/

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.




回答2:


In chrome you can right click on an element in the elements explorer view and select copy CSS path or copy Xpath.



来源:https://stackoverflow.com/questions/11443437/chrome-equivalent-of-firefox-firebug-css-select-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!