Raphaeljs IE8 setViewBox无法正常工作

时间:2015-04-24 08:33:37

标签: internet-explorer-8 raphael vml viewbox

我使用RaphaelJS生成SVG。我的SVG宽度和高度是1024px。 我使用setViewBox因为包含它的div比510px宽度和高度小。

使用IE8 RaphaelJS生成VML但setViewBox不起作用,生成的VML大小为1024px。

如何让VML响应?

paper = Raphael(document.getElementById("SVGDiv"));

paper.canvas.id = 'paper';
paper.setViewBox(0,0,1024,1024);
paper.setViewBox(0,0,1024,1024);
image = paper.image("",0,0, 1024, 1024);
text = paper.text(512, 512, '');
if( isIE() > 8 || isIE() == false){
    paper.setSize("100%","100%");
}

0 个答案:

没有答案
相关问题