可以让 Excanvas 在 IE 8 中工作吗? [英] Possible to get Excanvas to work in IE 8?

查看:27
本文介绍了可以让 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...

推荐答案

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

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天全站免登陆