SVG在Android浏览器 [英] SVG in the Android Browser

查看:198
本文介绍了SVG在Android浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这不是本机支持,但是否有任何JS垫片的渲染成一个画布对象或东西,让我来呈现SVG的原生Android的浏览器? (不是Opera等,因为我想,以避免用户需要安装其他浏览器)

I know it's not supported natively, but are there any JS Shims that render into a canvas object or something that would allow me to render SVG on the native android browser? (Not Opera, etc since I'd like to avoid having the user need to install another browser)

推荐答案

我想你想的是这个库:

HTTP://$c$c.google.com/p/canvg/

基本上,你会发现,如果浏览器能够呈现svgs的,如果不能,你将会使SVG到画布上。

Basically, you would detect if the browser is capable of rendering svgs, and if it can't, you would render the SVG to canvas.

这篇关于SVG在Android浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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