Firefox附件找到未使用的CSS样式 [英] Firefox addon to find Unused CSS styles
问题描述
可能重复:
用于识别未使用的CSS定义的工具
我有一个页面显示在我的浏览器,我有一个.CSS文件在这个页面上使用的规则像
Lets say I have a page displayed in my browser and I have a .CSS file used on this page with rules like
.class1{
/* some style definitions */
}
.class2{
/* some style definitions */
}
.class3{
/* some style definitions */
}
....
...
.class1001{
/* some style definitions */
}
现在我的问题是有什么插件会告诉我像这些规则, USED在页面上。
Now my question is is there any addon which would tell me like out of these rules, which are "NOT USED" on the page..
我看到一些相关的问题,提供链接到addon,告诉CSS选择器,在页面上使用...但我有像1000+规则,因此想直接了解未使用的规则。
I saw some related questions which provide links to addon that tell CSS selectors which are used on a page..But I have like 1000+ rules and hence want to directly know RULES which are NOT used..
只要添加,所提到的插件有1个问题;
如果有IE的hack(例如* html),它将它们标记为UNUSED,即使它实际上在IE中使用。是否有任何解决方法?
JUST TO ADD, the addons mentioned have 1 issue; Like if there are hacks for IE (e.g. *html), it marks them as UNUSED, even though it is actually used in IE. Is there any workaround for this ?
请帮助我。谢谢。
推荐答案
如果您使用Firefox,可以使用 Dust Me选择器插件,这正是你要求的。它找到未使用的选择器为你:)给它一试!
If you use Firefox, you can use the Dust Me Selectors plugin that does exactly what you asked for. It finds unused Selectors for you :) Give it a try!
此外,还有 CSS用法插件,它查看你的CSS文件,并告诉你哪些没有被使用。 :)
Also there is the CSS Usage plugin, that looks over your CSS file and tells you which ones are not being used. :)
这篇关于Firefox附件找到未使用的CSS样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!