"SVG Tiny 1.2"的性能优势在当今的移动&桌面浏览器? [英] Performance benefits for "SVG Tiny 1.2" in today’s mobile & desktop browsers?

查看:643
本文介绍了"SVG Tiny 1.2"的性能优势在当今的移动&桌面浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一种导出复杂矢量图形的最佳方法(例如,一个建筑计划,未压缩时的大小为几兆字节),以便在网络上实现最佳展示效果–我想知道是否最好使用Illustrator中推荐的SVG 1.1选项.

I am trying to find the best way to export a complex vector graphic (i.e., an architectural plan, weighing in at several megabytes uncompressed) for optimal display on the web – and I wonder, if the generally recommended SVG 1.1 option in Illustrator is the best choice.

到目前为止,我了解到的是 Scalable Vector Graphics Tiny 1.2规范 ...

From what I've learned so far, Scalable Vector Graphics Tiny 1.2 specification...

  • 曾经具有受限制的查看器支持,但是 对文件大小没有影响 ;减少它的最佳方法是使用 SVGO 删除不必要的小数. -我想除了最初的"baseprofile"参数之外, SVG Tiny 1.2文件与保存为SVG 1.1的相同矢量图形在结构上没有太大差异.
  • 具有某些 附加功能 ,这些功能在其他SVG口味中均不可用.
  • 提供> 简化的DOM 丢弃一些处理器密集型计算,例如裁剪,遮罩,符号或SVG滤镜效果.
  • used to have limited viewer support, but not anymore.
  • has no effect on file size; best way to reduce it is by shaving off unnecessary decimals with SVGO. — I suppose, other than the initial "baseprofile" parameter, an SVG Tiny 1.2 file will not structurally differ that much from an identical vector graphic saved as SVG 1.1.
  • has some additional features that aren't available in other SVG flavours.
  • offers a simplified DOM and discards some processor-intensive computations like clipping, masks, symbols, or SVG filter effects.

因此,关于最后一点,我想知道:当今的浏览器(尤其是在智能手机上)是否能够更有效地并因此更快地绘制SVG Tiny 1.2文件,因为他们知道它们可以分配更少的处理资源或可以省略某些渲染步骤?

So, regarding the last point, I wonder: Are today's browsers – especially on smartphones – able to paint an SVG Tiny 1.2 file more efficiently and therefore faster, knowing that they may allocate fewer processing resources or can omit certain rendering steps?

推荐答案

浏览器大多跳过了SVG 1.2功能,并完全忽略了baseProfile和版本属性.

Browsers have mostly skipped SVG 1.2 features and completely ignore baseProfile and version attributes.

从SVG 1.2中精选的功能包括:

The features from SVG 1.2 that have been cherry picked are:

  • 矢量效果非缩放笔划
  • viewBox ="none"

Firefox虽然我不确定其他任何UA是否支持viewBox ="none"

Firefox supports both of the above though I'm not sure any other UA supports viewBox="none"

这篇关于"SVG Tiny 1.2"的性能优势在当今的移动&桌面浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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