使用PHP压缩CSS文件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用PHP压缩CSS文件相关的知识,希望对你有一定的参考价值。
Paste the code in a file named style.php. Don’t forget to include your css files . Once done, open your html document and import style.php as you’ll import a css stylesheet.
function compress($buffer) { /* remove comments */ /* remove tabs, spaces, newlines, etc. */ ", " ", " ", " ", ' ', ' ', ' '), '', $buffer); return $buffer; } /* your css files */ include('master.css'); include('typography.css'); include('grid.css'); include('print.css'); include('handheld.css');
以上是关于使用PHP压缩CSS文件的主要内容,如果未能解决你的问题,请参考以下文章