fly63前端网

www.fly63.com

首页文章资源工具教程 栏目
  • 关于我们
  • 网站投稿
  • 赞助一下
搜索

在线工具_工作生活好帮手

打造各种简单、易用、便捷的在线工具,网友无需注册和下载安装即可使用

点击查看

关闭

提交网站

CleanCss
分享
复制链接
新浪微博
QQ 好友

扫一扫分享

网站地址:https://jakubpawlowicz.github.io/clean-css/
GitHub:https://github.com/jakubpawlowicz/clean-css
网站描述:基于Node.js的CSS代码压缩工具

Clean-css 是一个非常简单的 CSS 压缩程序,基于Node.js环境开发使用,可以删除 CSS 中一些无用的空格、评论以及每个选择器后面的分号,还可以压缩通过@import引入的CSS文件。


环境依赖

Node.js 4.0+ (tested on CentOS, Ubuntu, OS X, and Windows)


通过npm安装

npm install clean-css


如何使用命令行

Clean-CSS接受下列命令行参数,使用时请将需要优化的CSS文件<source-file>放置到最后一个参数后面,避免遇到潜在的不可预想的问题。

cleancss [options] source-file, [source-file, ...]

-h, --help                     output usage information
-v, --version                  output the version number
-b, --keep-line-breaks         Keep line breaks
-c, --compatibility [ie7|ie8]  Force compatibility mode (see Readme for advanced examples)
-d, --debug                    Shows debug information (minification time & compression efficiency)
-o, --output [output-file]     Use [output-file] as output instead of STDOUT
-r, --root [root-path]         Set a root path to which resolve absolute @import rules
-s, --skip-import              Disable @import processing
-t, --timeout [seconds]        Per connection timeout when fetching remote @imports (defaults to 5 seconds)
--rounding-precision [n]       Rounds to `N` decimal places. Defaults to 2. -1 disables rounding
--s0                           Remove all special comments, i.e. /*! comment */
--s1                           Remove all special comments but the first one
--semantic-merging             Enables unsafe mode by assuming BEM-like semantic stylesheets (warning, this may break your styling!)
--skip-advanced                Disable advanced optimizations - ruleset reordering & merging
--skip-aggressive-merging      Disable properties merging based on their order
--skip-import-from [rules]     Disable @import processing for specified rules
--skip-media-merging           Disable @media merging
--skip-rebase                  Disable URLs rebasing
--skip-restructuring           Disable restructuring optimizations
--skip-shorthand-compacting    Disable shorthand compacting
--source-map                   Enables building input's source map
--source-map-inline-sources    Enables inlining sources inside source maps


链接: https://fly63.com/nav/1367

more>>
相关栏目
sass
成熟、稳定和强大的CSS扩展语言
官网GitHub
postcss
PostCSS是一个使用JavaScript插件来转换CSS的工具。
官网GitHub
stylus
Stylus是一个高效、动态以及丰富的CSS预处理器
官网GitHub
animate.css
齐全的CSS3动画库
官网GitHub
Metro UI
基于平板界面设计CSS库是一种界面展示技术
官网GitHub
Spectre.css
轻量响应式 CSS 框架
官网GitHub
water.css
只需添加CSS框架即可应用样式,无需定义元素类
官网GitHub
DropCSS
一个用来清理无用 CSS 的小工具
点击进入GitHub
Pattern.css
一个CSS库,使用美丽的图案填充空的背景。
官网GitHub
three-dots
一组CSS加载动画,它由三个点组成,而这些点仅由单个元素组成
官网GitHub
CSSeffectsSnippets
提供了漂亮的CSS动画
官网GitHub
Angrytools
多样定制,实用,支持单个动画代码复制的网站
官网
magic
带多种动画效果的CSS3动画库
官网GitHub
topcoat
一款为简洁高速Web应用提供CSS开发的工具
官网GitHub
Biomatic UI
简单,灵活的CSS框架
官网GitHub
css-animation-101
从零开始介绍 CSS 动画开源电子书
官网GitHub

手机预览