Home  >  Article  >  Web Front-end  >  PurifyCSS:清除单页应用中没有使用的 CSS_html/css_WEB-ITnose

PurifyCSS:清除单页应用中没有使用的 CSS_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:11:441431browse

PurifyCSS 是干啥的

  • 可以检查应用程序中在使用哪些 CSS 类,进而创建一个(排除了没有用上的 CSS )的文件
  • 也可以检测 JavaScript 中动态加载的 CSS 类
  • 除了可用于单页应用(single-page app)之外,PurifyCSS 也可以用于静态页面应用(static page app)。

可能减少的量

  • Bootstrap 文件大小 ~140k
  • 平均 Bootstrap 的使用率是: ~40% (最多)
  • Minified Bootstrap: ~117k characters.
  • Purified + Minified Bootstrap: ~27k characters

项目主页:http://www.open-open.com/lib/view/home/1434202545692

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn