在移动设备上对SVG的支持有多完善? [英] How complete is support for SVG on mobile devices?

查看:98
本文介绍了在移动设备上对SVG的支持有多完善?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 各种移动浏览器中引入了多少 SVG规范?

  • 这些浏览器之间是否存在许多已知的不一致之处?

  • 是否有针对移动浏览器的Javascript SVG库?

解决方案

大多数浏览器将至少支持与SVG Tiny 1.1匹配的支持,以及SVG Tiny 1.2的功能(也与SVG Full 1.1匹配)(是的,我知道有点复杂-简而言之:Tiny是Full的子集,但是Full 1.2被放弃了,Tiny 1.2拥有Full 1.1所没有的一些功能.

在某些DOM接口中,在引用外部内容(例如,外部或字体)以及动画支持方面存在不一致.其余大多数往往工作得很好.

对于库,这取决于您要执行的操作.在智能手机上,如果Raphael不能正常工作,我会感到惊讶.对于更多受约束的设备,有Ikivo的Enrich框架,该框架不是免费的,但运行良好,并且如果您碰巧喜欢它们,可以与它们的IDE集成: http://ikivo.com/tools.html (免责声明:Ikivo是我的客户).

您也可以检查此图表以获得一般支持,它可能会随着更多的移动信息而更新: http://www.codedread.com/svg-support.php .

  • How much of the SVG specification has been introduced on the various mobile browers?

  • Are there many known inconsistencies between these browsers?

  • Are there any Javascript SVG libraries aimed at mobile browsers?

解决方案

Most browsers will have support that at least matches SVG Tiny 1.1, and the features of SVG Tiny 1.2 that are also in SVG Full 1.1 (yes I know, that's a bit complicated — in short: Tiny is a subset of Full, but Full 1.2 was abandoned, leaving Tiny 1.2 with some features that Full 1.1 does not have).

There are inconsistencies in some of the DOM interfaces, in referring to external content (e.g. external or fonts), and in animation support. Most of the rest tends to work pretty well.

As for libraries, it depends on what you want to do. On smartphones I would be surprised if Raphael didn't just work. For more constrained devices there's Ikivo's Enrich framework which isn't free but works well and integrates with their IDE if you happen to like those: http://ikivo.com/tools.html (disclaimed: Ikivo is a customer of mine).

You can also check this chart for support in general, it could be updated with more mobile information: http://www.codedread.com/svg-support.php.

这篇关于在移动设备上对SVG的支持有多完善?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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