Tool to see CSS specificity

孤人 提交于 2019-11-29 12:17:09

问题


Does anyone know if there is some kind of tool to see/pick the best CSS selector based on CSS specificity to target a particular div?

I know what has higher specificity, but sometimes when working on other people projects where they have deeply nested selectors in there CSS,it is hard to find a way to override there stuff.

I know in Google chromes dev tool/firebug it shows a lot of information at the bottom when viewing the page source, is that something that should be used for this or is there other methods?


回答1:


Use Chrome Inspector.

DevFest 2010 - Chrome Developer Tools - In Depth

Google Chrome Developer Tools: 12 Tricks to Develop Quicker

Google's Page on Dev Tools




回答2:


Since it's very widely used, no one's suggested it and fabianhjr suggested I do so, I'm going to recommend Firebug for Firefox. It's similar to Chrome's inspector, and allows you to see the CSS given to an element, as well as any overridden properties:



来源:https://stackoverflow.com/questions/8630801/tool-to-see-css-specificity

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