ie8浏览器中的画布不起作用

时间:2014-03-09 00:22:55

标签: javascript html5 css3 canvas internet-explorer-8

Html5画布在ie8浏览器中不起作用... 你们能告诉我如何修理它吗? 提供我的代码

 var animate = function() {
        ctx.width = ctx.width;

        percent += STEP_PERCENT;
        var deg = percent / 100 * deg360;

        drawArc('#aaa', radius, deg360);
        drawArc('#0e728e', radius, deg);
        for (var i = 0, n = Math.floor(deg / deg60); i < n; i++) {
            var from = i * deg30 + deg2;
            var to = from + deg30 - deg2 * 2
            drawArc('#250696', radius, to, from);
        }
        drawArc('#fff', radius - SPINNER_WIDTH, deg360);

        if (percent >= 100) {
            document.getElementById('text').innerText = 'FINISHED';
        } else {
            setTimeout(animate, STEP_DELAY);
        }
    }

1 个答案:

答案 0 :(得分:2)

IE8不支持Canvas,有一种叫做excanvas的工作https://code.google.com/p/explorercanvas/

效果相当好,但有些事情仍然不受支持