html - 如何删除css文件中没有被引用的类?
黄舟
黄舟 2017-04-17 11:38:06
0
1
478

我的css文件太大了,有许多没有被使用的类,如何才能把它们找出来给删除?有什么工具吗?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
PHPzhong

In the Developer Tools of the chrome browser, there is an audit option.
Click the run button, and you can find a Remove unused CSS rules, click on it and you will see a lot of current useless css rules.

Note that

useless here is relative. Many rules may only take effect after certain elements are clicked or an event is triggered, so manual screening is still required.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template