当我缩小css或js,为什么不是所有在一行? [英] When I minify css or js, why isn't it all on one line?

查看:124
本文介绍了当我缩小css或js,为什么不是所有在一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我理解,缩小尝试通过删除空格字符来减小文件大小。有时候事情总是在一条线上,但是经常会有多条线。我注意到,换行发生在空间出现的地方。

I understand that minifying tries to reduce file size by removing whitespace characters. Sometimes things end up on one line, but more often than not, there are multiple lines. I noticed that line breaks happen wherever spaces occur. Wouldn't it be better just to have it all on one line?

推荐答案

由于缺少示例代码和有关如何使用的信息正在执行缩小,我最好的猜测是:无论你使用什么来查看代码是执行词包装,并且没有任何真正的新行。

Given the lack of sample code and information about how the minification is being performed, my best guess would be: Whatever you are using to view the code is performing word wrapping and there aren't any real new lines in there.

这篇关于当我缩小css或js,为什么不是所有在一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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