可能得到Excanvas工作在IE 8? [英] Possible to get Excanvas to work in IE 8?

查看:190
本文介绍了可能得到Excanvas工作在IE 8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经在一个名为BeautyTips的jQuery插件上工作,它的工作很好。但是,因为我安装了IE 8,这个插件停止工作,因为它需要Excanvas使IE绘制矢量,图像等。

I used to work on a jQuery plugin named 'BeautyTips' and it was working just fine. But, since I've installed IE 8, this plugin stop working because it needs Excanvas to make IE draw the vectors, images etc.

我试图下载较新版本的Excanvas,但它不工作...

I've tried to download the newer version of Excanvas but it's not working at all...

推荐答案

尝试在初始化之前将canvas元素附加到文档excanvas:

Try appending the canvas element to the document before initializing it using excanvas:

var foo = document.getElementById("targetElementID");
var canvas = document.createElement('canvas');
canvas.setAttribute("width", 620);
canvas.setAttribute("height", 310);
canvas.setAttribute("class", "mapping");
foo.appendChild(canvas);
canvas = G_vmlCanvasManager.initElement(canvas);

这篇关于可能得到Excanvas工作在IE 8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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