如何使用font-face缩小CSS [英] How to minify CSS with font-face

查看:153
本文介绍了如何使用font-face缩小CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有font-face的样式表。当我使用在线服务minify css,font-face停止工作。我采取的方法是提取font-face代码,缩小css的其余部分,然后粘贴在缩小的样式表的顶部的font-face。好奇,如果有人有更好的方法。

I've got a stylesheet with font-face. When I minify the css using online services, the font-face stops working. The approach I've taken is the to extract the font-face code, minify the rest of the css and then stick the font-face at the top of the minified stylesheet. Curious if anyone has a better approach to this.

这里是我的代码: http://snipt.org/zfAj5

我使用此服务来缩小我的代码: http://www.minifycss.com/css-compressor/

I used this service to minify my code: http://www.minifycss.com/css-compressor/

推荐答案

如果您用于缩小CSS的工具无法缩小CSS,请将其舍弃,并获得更好的工具。

If the tool you're using to minify CSS can't minify CSS, throw it out and get a better tool.

YUI Compressor是一个良好的CSS和JavaScript的缩小工具

这篇关于如何使用font-face缩小CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆