解決在android裏面(三星s3)等一些4.1系統的手機上cancas刮刮樂無效

 function drawcircle(id,x,y,r){
                var ca = document.getElementById(id);
                var cans = ca.getContext("2d");
                cans.globalCompositeOperation = "destination-out";
                cans.beginPath();
                cans.arc(x,y,r,0,Math.PI*2);
                //解決兼容
                ca.style.display = ‘none’;
                ca.offsetHeight;
                ca.style.display = ‘inherit’; 
                //解決兼容
                cans.fillStyle="#000";
                cans.fill();
            }
這樣能夠解決

參考自:http://bbs.csdn.net/topics/390808206java

相關文章
相關標籤/搜索