• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

检查未使用的 CSS 选择器的工具?

用户头像
it1352
帮助4

问题说明

我知道有一个名为 Dust-Me Selectors for Firefox 的扩展,而且它不查看 JavaScript 生成的动态 HTML.

I know there is an extension called Dust-Me Selectors for Firefox and also that it doesn't look at dynamic HTML generated by JavaScript.

我正在寻找可以从样式表中识别所有未使用的选择器的工具,这些选择器附加到多个页面,并且所有 JavaScript 都在运行并检查选择器?我现在知道的唯一选择是手动检查文件并找到未使用的选择器:(

I'm looking for tool(s) that can identify all unused selectors from a stylesheet, attached to several pages, with all the JavaScript running and checking selectors? The only option I know right now for this is manually checking files and finding unused selectors :(

在 IDE 中 - 我相信 NetBeans 在编写 Java 代码时会在未使用库时提供警告消息.如果没有 IDE(NetBeans、Eclipse、Dreamweaver 等)插件来搜索选择器,我的选择是什么?

In IDE's - I believe NetBeans provides a warning message when writing Java code, if a library is not under use. Without an IDE (NetBeans, Eclipse, Dreamweaver, etc) plugin to search for the selectors what are my options?

另外,是否有工具可以检查同一文件中未使用的选择器.我的意思是如果所有的 JS、HTML 和 CSS 代码都在同一个文件中.

Also, is there a tool to check for unused selectors in the same file. I mean if all the JS, HTML and CSS code is in the same file.

正确答案

#1

我认为 http://unused-css.com 会做你想做的事.

I think that http://unused-css.com will do exactly what you want.

https://github.com/geuis/helium-css可以帮忙

以及:http://razorfast.com/2010/11/21/announcing-cssess-the-bookmarklet-that-finds-unused-css-selectors/

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tangibggf
系列文章
更多 icon
同类精品
更多 icon
继续加载