如何在我的HTML中找到未使用的类 [英] How to find unused classes in my HTML
问题描述
有许多工具可用于在Chrome Audit和firefox dust me css等样式表中查找未使用的CSS规则。
There are lots of tools for finding unused css rules in style sheets such as Chrome Audit and firefox dust me css.
但
如何查找我的HTML中不存在于我的样式表中的类
How do i find classes that are in my HTML that DOES NOT exist in my stylesheets??
推荐答案
这可能会有所帮助: https://code.google.com/p/find-unused-classes/ 。根据描述:
This may be helpful: https://code.google.com/p/find-unused-classes/ . According to the description:
它显示存在于css选择器中的类,不存在于html页面和类似方法。
It shows classes that are exist in css selectors and not exist on html page and like-verse.
正如Jim所说,请注意,一些类可能未被您的样式表使用,但仍在JavaScript中使用。
As Jim said, be warned that some classes may be unused by your stylesheets but still used in JavaScript.
这篇关于如何在我的HTML中找到未使用的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!