Options:
Optional options: none
Optional options (you can choose Yes or No for each):
Optional options (you can choose Yes or No for each):
Optional options: none
Options:
This tool is based on the YUI compressor, but will automatically remove IE hacks . The explanation given by the developer is that IE hacks should appear in a single file, rather than mixed in the main CSS file, which will become difficult to maintain.
Optional: None
Recommended desktop CSS compression tools
YUI Compressor and TB Compressor
YUI Compressor is a front-end code compression tool developed by the Yahoo front-end team and is very powerful. A Java running environment is required. You can use the java command to manually compress CSS and JS files, or you can use ant to compress them in batches during compilation .
Yu Bo from the Taobao front-end team uses the Windows platform compression tool packaged by YUI compressor, which is very easy to install and uninstall. Just like the powerful YUI Compressor, TBCompressor can not only compress CSS, but also compress JS.
Download it here . Learn more about TBCompressor – JS and CSS compression tool
In addition, it is recommended to read " Improving the Compression Process of CSS Files by TBCompressor " by Qu Chao.
web 2.0 resource optimization tools
A desktop tool developed by Chinese people using Delphi 7 can also compress CSS and JS. Recommend it. It is also worth mentioning that the author released the source code of the project.
mergeCSS
An AIR-based tool produced by CSS Forest Webmaster Gui Ge, which has many useful functions, such as merging multiple files, merging @import imported files, etc. View detailed introduction .
It should be noted that the tool's support for abbreviations and attribute merging is not very good. It may be better if these supports can be added.
Another very important thing is that so far, Gui Ge has not released this tool . If you want to try it, you can contact him.
page speed
Page speed is actually a firefox plug-in based on Firebug developed by Google. It is mainly used to analyze the front-end performance of the website. But in the Minify CSS option in the page speed analysis results list, click it to see the compression ratio of your CSS , and a compressed version is provided later, which you can click to view. The only drawback is that the compression cannot be customized.
No matter how ugly the website, GZIP is a really useful tool for compressing many types of code. It may not be the simplest compression method, and it may be a bit confusing for beginners. Check out this tutorial for more information on using GZIP to compress your styles.
Summarize
As I said earlier, some of these methods may seem excessive or pointless. The key is to look at the big picture. While any one of these techniques may only have an almost negligible impact, combining several or all of these techniques can have a huge impact on the size of your CSS files.