简体   繁体   中英

canvas in ie8 browsers not working

Html5 canvas not working in ie8 browsers... can you guys tell me how to fix it... providing my code below

 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);
        }
    }

Canvas is not supported in IE8, there is a work around called excanvas https://code.google.com/p/explorercanvas/

that works rather well, but some thing still wont be supported

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM